text
stringlengths
8
4.13M
mod graph_app; pub mod gui_renderer; mod perf_app; mod stat_app; pub use graph_app::GridApp; pub use gui_renderer::GUIRenderer; pub use perf_app::PerfApp; pub use stat_app::StatApp;
fn func1(){ let sum = 0; for i in 1..5 { let sum = sum + i; println!("{}",sum) } println!("{}",sum); println!("ここまでがfunc1です") } fn func2(){ let mut sum = 0; for i in 0..15 { sum = sum + i } println!("{}!!!!",sum) } fn main(){ func1(); func2() }
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. //! The Archivist collects and stores diagnostic data from components. #![allow(dead_code)] #![warn(missing_docs)] use { archivist_lib::{archive, configs, diagnostics, inspect, logs, selectors}, failure::Error, fidl::endpoints::create_proxy, fidl_fuchsia_diagnostics_inspect::Selector, fidl_fuchsia_io::{DirectoryMarker, DirectoryProxy}, fuchsia_async as fasync, fuchsia_component::server::ServiceFs, futures::{future, FutureExt, StreamExt}, io_util, std::path::PathBuf, std::sync::{Arc, Mutex}, }; static INSPECT_ALL_SELECTORS: &str = "/config/data/pipelines/all/"; static ARCHIVE_CONFIG_FILE: &str = "/config/data/archivist_config.json"; static DEFAULT_NUM_THREADS: usize = 4; fn main() -> Result<(), Error> { let mut executor = fasync::Executor::new()?; diagnostics::init(); // Ensure that an archive exists. std::fs::create_dir_all(archive::ARCHIVE_PATH).expect("failed to initialize archive"); let opt = logs::Opt::from_args(); let log_manager = logs::LogManager::new(); if !opt.disable_klog { log_manager.spawn_klogger()?; } let mut fs = ServiceFs::new(); diagnostics::export(&mut fs); fs.add_remote( "archive", io_util::open_directory_in_namespace( archive::ARCHIVE_PATH, io_util::OPEN_RIGHT_READABLE | io_util::OPEN_RIGHT_WRITABLE, )?, ); // Publish stats on global storage. fs.add_remote( "global_data", storage_inspect_proxy("global_data".to_string(), PathBuf::from("/global_data"))?, ); fs.add_remote( "global_tmp", storage_inspect_proxy("global_tmp".to_string(), PathBuf::from("/global_tmp"))?, ); let all_selectors: Vec<Arc<Selector>> = match selectors::parse_selectors(INSPECT_ALL_SELECTORS) { Ok(selectors) => selectors.into_iter().map(|selector| Arc::new(selector)).collect(), Err(parsing_error) => panic!("Parsing selectors failed: {}", parsing_error), }; // The repository that will serve as the data transfer between the archivist server // and all services needing access to inspect data. let all_inspect_repository = Arc::new(Mutex::new(inspect::InspectDataRepository::new(all_selectors))); let archivist_configuration: configs::Config = match configs::parse_config(ARCHIVE_CONFIG_FILE) { Ok(config) => config, Err(parsing_error) => panic!("Parsing configuration failed: {}", parsing_error), }; let archivist_threads: usize = archivist_configuration.num_threads.unwrap_or(DEFAULT_NUM_THREADS); let archivist_state = archive::ArchivistState::new(archivist_configuration, all_inspect_repository.clone())?; let log_manager2 = log_manager.clone(); let log_manager3 = log_manager.clone(); fs.dir("svc") .add_fidl_service(move |stream| log_manager2.spawn_log_manager(stream)) .add_fidl_service(move |stream| log_manager3.spawn_log_sink(stream)) .add_fidl_service(move |stream| { // Every reader session gets their own clone of the inspect repository. // This ends up functioning like a SPMC channel, in which only the archivist // pushes updates to the repository, but multiple inspect Reader sessions // read the data. let reader_inspect_repository = all_inspect_repository.clone(); let inspect_reader_server = inspect::ReaderServer::new(reader_inspect_repository); inspect_reader_server.spawn_reader_server(stream) }); fs.take_and_serve_directory_handle()?; executor.run( future::try_join(fs.collect::<()>().map(Ok), archive::run_archivist(archivist_state)), archivist_threads, )?; Ok(()) } // Returns a DirectoryProxy that contains a dynamic inspect file with stats on files stored under // `path`. fn storage_inspect_proxy(name: String, path: PathBuf) -> Result<DirectoryProxy, Error> { let (proxy, server) = create_proxy::<DirectoryMarker>().expect("failed to create directoryproxy"); fasync::spawn(async move { diagnostics::publish_data_directory_stats(name, path, server.into_channel().into()).await; }); Ok(proxy) }
//! Search query parser //! //! This module parses a query and converts it into a SQL statement. This statement can be used in //! the database to search for tracks. /// Enum providing allowed tags in the search query, like 'title:Crazy' #[derive(Debug)] pub enum Tag { Any(String), Title(String), Album(String), Interpret(String), People(String), Composer(String), Playlist(String) } /// Order by certain field pub enum Order { ByDate, ByTitle, ByFavs, ByRandom } impl Order { /// Create a new ordering from a query pub fn from_search_query(query: &str) -> Option<Order> { let elms = query.split(':').collect::<Vec<&str>>(); if elms.len() == 2 && elms[0] == "order" { return match elms[1] { "date" => Some(Order::ByDate), "title" => Some(Order::ByTitle), "favs" => Some(Order::ByFavs), "rand" => Some(Order::ByRandom), "random" => Some(Order::ByRandom), "randomly" => Some(Order::ByRandom), _ => None }; } None } /// Stringify the enum pub fn name(&self) -> String { let tmp = match *self { Order::ByDate => "Created", Order::ByTitle => "Title", Order::ByFavs => "FavsCount", Order::ByRandom => "RANDOM()", }; tmp.into() } } impl Tag { /// Create a new tag from a search query pub fn from_search_query(query: &str) -> Option<Tag> { let elms = query.split(':').map(|x| x.into()).collect::<Vec<String>>(); if elms.len() == 1 { Some(Tag::Any(elms[0].replace("'", "''"))) } else { let content = elms[1].replace("'", "''"); match elms[0].as_str() { "title" | "TITLE" => Some(Tag::Title(content)), "album" | "ALBUM" => Some(Tag::Album(content)), "interpret" | "INTERPRET" => Some(Tag::Interpret(content)), "people" | "performer" | "PEOPLE" | "PERFORMER" => Some(Tag::People(content)), "composer" | "COMPOSER" => Some(Tag::Composer(content)), "playlist" | "PLAYLIST" | "pl" => Some(Tag::Playlist(content)), _ => return None } } } /// Converts the tag to a SQL statement pub fn to_sql_query(self) -> String { match self { Tag::Any(x) => format!("Title LIKE '%{}%' OR Album LIKE '%{}%' OR Interpret LIKE '%{}%' OR People LIKE '%{}' OR Composer LIKE '%{}%'", x, x, x, x, x), Tag::Title(x) => format!("Title LIKE '%{}%'", x), Tag::Album(x) => format!("Album LIKE '%{}%'", x), Tag::Interpret(x) => format!("Interpret LIKE '%{}%'", x), Tag::People(x) => format!("People LIKE '%{}%'", x), Tag::Composer(x) => format!("Composer LIKE '%{}%'", x), Tag::Playlist(x) => format!("INSTR((SELECT hex(tracks) FROM Playlists WHERE title='{}'),hex(key))>0", x) } } pub fn is_playlist_query(&self) -> Option<String> { match self { Tag::Playlist(ref x) => Some(x.clone()), _ => None } } } /// A search query consists of serveral tags and an ordering pub struct SearchQuery { tags: Vec<Tag>, order: Option<Order> } impl SearchQuery { /// Create a new search query pub fn new(input: &str) -> SearchQuery { let tags = input.split(',').filter_map(Tag::from_search_query).collect(); let order = input.split(',').filter_map(Order::from_search_query).next(); SearchQuery { tags: tags, order: order } } /// Check for emptiness pub fn is_empty(&self) -> bool { self.tags.is_empty() } /// Converts the search query to SQL pub fn to_sql_query(self) -> String { let mut tmp: String = "SELECT * FROM Tracks".into(); let mut found_playlist_query = None; if !self.tags.is_empty() { found_playlist_query = self.tags.iter().filter_map(|x| x.is_playlist_query()).next(); tmp.push_str(" WHERE "); tmp.push_str(&self.tags.into_iter().map(|x| x.to_sql_query()).collect::<Vec<String>>().join(" AND ")); } if let Some(playlist) = found_playlist_query { if self.order.is_none() { tmp.push_str(" ORDER BY INSTR((SELECT hex(tracks) FROM Playlists WHERE title='"); tmp.push_str(&playlist); tmp.push_str("'),hex(key)) ASC"); } else { tmp.push_str(" ORDER BY "); tmp.push_str(&self.order.unwrap_or(Order::ByDate).name()); tmp.push_str(" DESC"); } } else { tmp.push_str(" ORDER BY "); tmp.push_str(&self.order.unwrap_or(Order::ByDate).name()); tmp.push_str(" DESC"); } tmp } }
// Copyright (c) 2021 Quark Container Authors / 2018 The gVisor Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. use alloc::sync::Arc; use super::super::super::qlib::mem::seq::*; use super::transport::unix::*; // EndpointWriter implements safemem.Writer that writes to a transport.Endpoint. pub struct EndpointWriter { pub Endpoint: Arc<Endpoint>, pub Control: SCMControlMessages, pub To: BoundEndpoint, } /* impl BlockSeqWriter for EndpointWriter { fn WriteFromBlocks(&mut self, srcs: &[IoVec]) -> Result<usize> { } } */
use std::time::{SystemTime, UNIX_EPOCH}; use num::BigUint; /// The modulus constant from the GCC implementation of rand (2^31). We can make this more efficient /// with binary trickery if we so choose, since it's just a power of two. const GCC_MOD: u64 = 2147483648; /// The multiplication constant from GCC const GCC_MULT: u64 = 1103515245; /// The increment constant from GCC const GCC_INC: u64 = 12345; /// This struct represents a random number generator using the linear congruential method (L.C.M.), /// since RNG is ultimately a sequence. `Rng` is not accessible outside of the `rand` module, /// creation will have two layers of abstraction. pub struct Rng { /// Multiplier a: u64, /// Current value x: u64, /// Increment c: u64, /// Modulus m: u64, } impl Rng { /// Returns a new random number generator with the parameters specified here /// /// # Arguments /// * `modulus` - The modulus value for L.C.M. /// * `multiplier` - The multiplier for L.C.M. /// * `increment` - The increment for L.C.M. /// * `seed` - Initial value for L.C.M. sequence fn new(modulus: u64, multiplier: u64, increment: u64, seed: u64) -> Rng { let mut ret = Rng { a: multiplier, x: seed, c: increment, m: modulus }; let _ = ret.next(); // So we don't just return the seed as the first value ret } /// Return the next random number in the sequence, normalized as a value in the range [0..1) pub fn next(&mut self) -> f64 { self.x = (self.a * self.x + self.c) % self.m; (self.x as f64) / (self.m as f64) } /// Return the next random number in the sequence, as an integer in the range [min..max) pub fn next_int(&mut self, min: u64, max: u64) -> u64 { let range: f64 = (max - min) as f64; min + ((self.next() * range) as u64) } /// Return the next random number in the sequence, normalized as a BigUint of size num_bytes pub fn next_bigint(&mut self, num_bytes: usize) -> BigUint { let mut bytes = vec![0_u8; num_bytes]; for i in 0..num_bytes { bytes[i] = (self.next() * (u8::MAX as f64)) as u8; } BigUint::from_bytes_be(&bytes) } } /// Returns a new RNG object, seeded with the explicitly provided seed pub fn new_seed(seed: u64) -> Rng { Rng::new(GCC_MOD, GCC_MULT, GCC_INC, seed) } /// Returns a new RNG object, seeded with the current Unix time in seconds pub fn new() -> Rng { let seed: u64 = (SystemTime::now().duration_since(UNIX_EPOCH) .expect("Unable to retrieve Unix time") .as_micros() * 100) as u32 as u64; new_seed(seed) }
use std::io; use std::result; use log; use std::num; pub type Result<T> = result::Result<T, TransferError>; quick_error! { #[derive(Debug)] pub enum TransferError { Io(err: io::Error) { cause(err) description(err.description()) from() } Log(err: log::SetLoggerError) { cause(err) description(err.description()) from() } ParseInt(err: num::ParseIntError) { cause(err) description(err.description()) from() } Msg(s: String) { description(s) display("{}", s) from() from(s: &'static str) -> (s.to_owned()) } #[allow(dead_code)] StaticMsg(msg: &'static str) { description(msg) display("{}", msg) } } }
// This file was generated by gir (https://github.com/gtk-rs/gir) // from ../gir-files // DO NOT EDIT use crate::Message; use crate::MessageHeaders; use glib::object::IsA; use glib::translate::*; use glib::StaticType; use std::fmt; use std::ptr; glib::wrapper! { #[doc(alias = "SoupMultipartInputStream")] pub struct MultipartInputStream(Object<ffi::SoupMultipartInputStream, ffi::SoupMultipartInputStreamClass>) @extends gio::InputStream; match fn { type_ => || ffi::soup_multipart_input_stream_get_type(), } } impl MultipartInputStream { #[doc(alias = "soup_multipart_input_stream_new")] pub fn new<P: IsA<Message>, Q: IsA<gio::InputStream>>(msg: &P, base_stream: &Q) -> MultipartInputStream { skip_assert_initialized!(); unsafe { from_glib_full(ffi::soup_multipart_input_stream_new(msg.as_ref().to_glib_none().0, base_stream.as_ref().to_glib_none().0)) } } } pub const NONE_MULTIPART_INPUT_STREAM: Option<&MultipartInputStream> = None; pub trait MultipartInputStreamExt: 'static { #[doc(alias = "soup_multipart_input_stream_get_headers")] #[doc(alias = "get_headers")] fn headers(&self) -> Option<MessageHeaders>; #[doc(alias = "soup_multipart_input_stream_next_part")] fn next_part<P: IsA<gio::Cancellable>>(&self, cancellable: Option<&P>) -> Result<Option<gio::InputStream>, glib::Error>; fn message(&self) -> Option<Message>; } impl<O: IsA<MultipartInputStream>> MultipartInputStreamExt for O { fn headers(&self) -> Option<MessageHeaders> { unsafe { from_glib_none(ffi::soup_multipart_input_stream_get_headers(self.as_ref().to_glib_none().0)) } } fn next_part<P: IsA<gio::Cancellable>>(&self, cancellable: Option<&P>) -> Result<Option<gio::InputStream>, glib::Error> { unsafe { let mut error = ptr::null_mut(); let ret = ffi::soup_multipart_input_stream_next_part(self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } fn message(&self) -> Option<Message> { unsafe { let mut value = glib::Value::from_type(<Message as StaticType>::static_type()); glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"message\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().expect("Return Value for property `message` getter") } } } impl fmt::Display for MultipartInputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("MultipartInputStream") } }
//! A wrapper to implement hash for k8s resource objects. use k8s_openapi::{apimachinery::pkg::apis::meta::v1::ObjectMeta, Metadata}; use std::hash::{Hash, Hasher}; use std::ops::Deref; /// A wrapper that provdies a [`Hash`] implementation for any k8s resource /// object. /// Delegates to object uid for hashing and equality. #[derive(Debug)] pub struct HashValue<T: Metadata<Ty = ObjectMeta>>(T); impl<T> HashValue<T> where T: Metadata<Ty = ObjectMeta>, { /// Create a new [`HashValue`] by wrapping a value of `T`. pub fn new(value: T) -> Self { Self(value) } /// Get the `uid` from the `T`'s [`Metadata`] (if any). pub fn uid(&self) -> Option<&str> { let ObjectMeta { ref uid, .. } = self.0.metadata(); let uid = uid.as_ref()?; Some(uid.as_str()) } } impl<T> PartialEq<Self> for HashValue<T> where T: Metadata<Ty = ObjectMeta>, { fn eq(&self, other: &Self) -> bool { match (self.uid(), other.uid()) { (Some(a), Some(b)) => a.eq(b), (None, None) => true, _ => false, } } } impl<T> Eq for HashValue<T> where T: Metadata<Ty = ObjectMeta> {} impl<T> Hash for HashValue<T> where T: Metadata<Ty = ObjectMeta>, { fn hash<H: Hasher>(&self, state: &mut H) { self.uid().hash(state) } } impl<T> Deref for HashValue<T> where T: Metadata<Ty = ObjectMeta>, { type Target = T; fn deref(&self) -> &Self::Target { &self.0 } } impl<T> AsRef<T> for HashValue<T> where T: Metadata<Ty = ObjectMeta>, { fn as_ref(&self) -> &T { &self.0 } }
//! An instrumenting state wrapper. use crate::internal_events::kubernetes::instrumenting_state as internal_events; use async_trait::async_trait; use futures::future::BoxFuture; /// A [`super::Write`] implementatiom that wraps another [`super::Write`] and /// adds instrumentation. pub struct Writer<T> { inner: T, } impl<T> Writer<T> { /// Take a [`super::Write`] and return it wrapped with [`Self`]. pub fn new(inner: T) -> Self { Self { inner } } } #[async_trait] impl<T> super::Write for Writer<T> where T: super::Write + Send, { type Item = <T as super::Write>::Item; async fn add(&mut self, item: Self::Item) { emit!(internal_events::StateItemAdded); self.inner.add(item).await } async fn update(&mut self, item: Self::Item) { emit!(internal_events::StateItemUpdated); self.inner.update(item).await } async fn delete(&mut self, item: Self::Item) { emit!(internal_events::StateItemDeleted); self.inner.delete(item).await } async fn resync(&mut self) { emit!(internal_events::StateResynced); self.inner.resync().await } } #[async_trait] impl<T> super::MaintainedWrite for Writer<T> where T: super::MaintainedWrite + Send, { fn maintenance_request(&mut self) -> Option<BoxFuture<'_, ()>> { self.inner.maintenance_request().map(|future| { emit!(internal_events::StateMaintenanceRequested); future }) } async fn perform_maintenance(&mut self) { emit!(internal_events::StateMaintenancePerformed); self.inner.perform_maintenance().await } } #[cfg(test)] mod tests { use super::super::{mock, MaintainedWrite, Write}; use super::*; use crate::test_util; use futures::{channel::mpsc, SinkExt, StreamExt}; use k8s_openapi::{api::core::v1::Pod, apimachinery::pkg::apis::meta::v1::ObjectMeta}; use once_cell::sync::OnceCell; use std::sync::{Mutex, MutexGuard}; fn prepare_test() -> ( Writer<mock::Writer<Pod>>, mpsc::Receiver<mock::ScenarioEvent<Pod>>, mpsc::Sender<()>, ) { let (events_tx, events_rx) = mpsc::channel(0); let (actions_tx, actions_rx) = mpsc::channel(0); let writer = mock::Writer::new(events_tx, actions_rx); let writer = Writer::new(writer); (writer, events_rx, actions_tx) } fn make_pod() -> Pod { Pod { metadata: ObjectMeta { name: Some("pod_name".to_owned()), uid: Some("pod_uid".to_owned()), ..ObjectMeta::default() }, ..Pod::default() } } fn get_metric_value(op_kind: &'static str) -> Option<metrics_runtime::Measurement> { let controller = crate::metrics::CONTROLLER.get().unwrap_or_else(|| { crate::metrics::init().unwrap(); crate::metrics::CONTROLLER .get() .expect("failed to init metric container") }); let key = metrics_core::Key::from_name_and_labels( "k8s_state_ops", vec![metrics_core::Label::new("op_kind", op_kind)], ); controller .snapshot() .into_measurements() .into_iter() .find_map(|(candidate_key, measurement)| { if candidate_key == key { Some(measurement) } else { None } }) } fn assert_counter_changed( before: Option<metrics_runtime::Measurement>, after: Option<metrics_runtime::Measurement>, expected_difference: u64, ) { let before = before.unwrap_or_else(|| metrics_runtime::Measurement::Counter(0)); let after = after.unwrap_or_else(|| metrics_runtime::Measurement::Counter(0)); let (before, after) = match (before, after) { ( metrics_runtime::Measurement::Counter(before), metrics_runtime::Measurement::Counter(after), ) => (before, after), _ => panic!("metrics kind mismatch"), }; let difference = after - before; assert_eq!(difference, expected_difference); } /// Guarantees only one test will run at a time. /// This is required because we assert on a global state, and we don't /// want interference. fn tests_lock() -> MutexGuard<'static, ()> { static INSTANCE: OnceCell<Mutex<()>> = OnceCell::new(); INSTANCE.get_or_init(|| Mutex::new(())).lock().unwrap() } // TODO: tests here are ignored because they cause interference with // the metrics tests. // There is no way to assert individual emits, and asserting metrics // directly causes issues: // - these tests break the internal tests at the metrics implementation // itself, since we end up initializing the metrics controller twice; // - testing metrics introduces unintended coupling between subsystems, // ideally we only need to assert that we emit, but avoid assumptions on // what the results of that emit are. // Unignore them and/or properly reimplemenmt once the issues above are // resolved. #[ignore] #[test] fn add() { let _guard = tests_lock(); test_util::trace_init(); test_util::block_on_std(async { let (mut writer, mut events_rx, mut actions_tx) = prepare_test(); let pod = make_pod(); let join = { let pod = pod.clone(); let before = get_metric_value("item_added"); tokio::spawn(async move { assert_eq!( events_rx.next().await.unwrap().unwrap_op(), (pod, mock::OpKind::Add) ); // By now metrics should've updated. let after = get_metric_value("item_added"); assert_counter_changed(before, after, 1); actions_tx.send(()).await.unwrap(); }) }; writer.add(pod).await; join.await.unwrap(); }) } #[ignore] #[test] fn update() { let _guard = tests_lock(); test_util::trace_init(); test_util::block_on_std(async { let (mut writer, mut events_rx, mut actions_tx) = prepare_test(); let pod = make_pod(); let join = { let pod = pod.clone(); let before = get_metric_value("item_updated"); tokio::spawn(async move { assert_eq!( events_rx.next().await.unwrap().unwrap_op(), (pod, mock::OpKind::Update) ); // By now metrics should've updated. let after = get_metric_value("item_updated"); assert_counter_changed(before, after, 1); actions_tx.send(()).await.unwrap(); }) }; writer.update(pod).await; join.await.unwrap(); }) } #[ignore] #[test] fn delete() { let _guard = tests_lock(); test_util::trace_init(); test_util::block_on_std(async { let (mut writer, mut events_rx, mut actions_tx) = prepare_test(); let pod = make_pod(); let join = { let pod = pod.clone(); let before = get_metric_value("item_deleted"); tokio::spawn(async move { assert_eq!( events_rx.next().await.unwrap().unwrap_op(), (pod, mock::OpKind::Delete) ); // By now metrics should've updated. let after = get_metric_value("item_deleted"); assert_counter_changed(before, after, 1); actions_tx.send(()).await.unwrap(); }) }; writer.delete(pod).await; join.await.unwrap(); }) } #[ignore] #[test] fn resync() { let _guard = tests_lock(); test_util::trace_init(); test_util::block_on_std(async { let (mut writer, mut events_rx, mut actions_tx) = prepare_test(); let join = { let before = get_metric_value("resynced"); tokio::spawn(async move { assert!(matches!( events_rx.next().await.unwrap(), mock::ScenarioEvent::Resync )); let after = get_metric_value("resynced"); assert_counter_changed(before, after, 1); actions_tx.send(()).await.unwrap(); }) }; writer.resync().await; join.await.unwrap(); }) } #[ignore] #[test] fn request_maintenance_without_maintenance() { let _guard = tests_lock(); test_util::trace_init(); test_util::block_on_std(async { let (mut writer, _events_rx, _actions_tx) = prepare_test(); let before = get_metric_value("maintenace_requested"); let _ = writer.maintenance_request(); let after = get_metric_value("maintenace_requested"); assert_counter_changed(before, after, 0); }) } #[ignore] #[test] fn request_maintenance_with_maintenance() { let _guard = tests_lock(); test_util::trace_init(); test_util::block_on_std(async { let (events_tx, _events_rx) = mpsc::channel(0); let (_actions_tx, actions_rx) = mpsc::channel(0); let (maintenance_request_events_tx, _maintenance_request_events_rx) = mpsc::channel(0); let (_maintenance_request_actions_tx, maintenance_request_actions_rx) = mpsc::channel(0); let writer = mock::Writer::<Pod>::new_with_maintenance( events_tx, actions_rx, maintenance_request_events_tx, maintenance_request_actions_rx, ); let mut writer = Writer::new(writer); let before = get_metric_value("maintenace_requested"); let _ = writer.maintenance_request(); let after = get_metric_value("maintenace_requested"); assert_counter_changed(before, after, 1); }) } #[ignore] #[test] fn perform_maintenance() { let _guard = tests_lock(); test_util::trace_init(); test_util::block_on_std(async { let (mut writer, mut events_rx, mut actions_tx) = prepare_test(); let join = { let before = get_metric_value("maintenace_performed"); tokio::spawn(async move { assert!(matches!( events_rx.next().await.unwrap(), mock::ScenarioEvent::Maintenance )); let after = get_metric_value("maintenace_performed"); assert_counter_changed(before, after, 1); actions_tx.send(()).await.unwrap(); }) }; writer.perform_maintenance().await; join.await.unwrap(); }) } }
use image; use crate::shaders::OurShader; use crate::AbstractContext; use crate::Context; use crate::NativeTexture; #[derive(Copy, Clone)] pub enum TextureFormat { RGBA, LUMINANCE, } pub struct Texture { texture: NativeTexture, _format: TextureFormat, _type: u32, } impl Texture { pub fn from_3d_data( width: u32, height: u32, depth: u32, format: TextureFormat, data: &[u8], is_array: bool, ) -> Self { let _type = if is_array { Context::TEXTURE_2D_ARRAY } else { Context::TEXTURE_3D }; let context = Context::get_context(); let texture = context.create_texture().unwrap(); context.bind_texture(_type, &texture); let formatv: u32 = format.into(); context.tex_parameteri(_type, Context::TEXTURE_MIN_FILTER, Context::LINEAR as i32); context.tex_parameteri(_type, Context::TEXTURE_MAG_FILTER, Context::LINEAR as i32); context.tex_image3d( _type, 0, Context::RGBA8 as i32, width as i32, height as i32, depth as i32, 0, formatv, Some(data), ); let texture = Texture { texture, _format: format, _type, }; //context.generate_mipmap(Context::TEXTURE_3D); texture } pub fn from_3d_data_f( width: u32, height: u32, depth: u32, format: TextureFormat, data: &[f32], is_array: bool, ) -> Self { let _type = if is_array { Context::TEXTURE_2D_ARRAY } else { Context::TEXTURE_3D }; let context = Context::get_context(); let texture = context.create_texture().unwrap(); context.bind_texture(_type, &texture); let formatv: u32 = format.into(); context.tex_parameteri(_type, Context::TEXTURE_MIN_FILTER, Context::NEAREST as i32); context.tex_parameteri(_type, Context::TEXTURE_MAG_FILTER, Context::NEAREST as i32); context.tex_image3d_f( _type, 0, Context::RGBA32F as i32, width as i32, height as i32, depth as i32, 0, formatv, Some(data), ); let texture = Texture { texture, _format: format, _type, }; //context.generate_mipmap(Context::TEXTURE_3D); texture } pub fn from_data(width: u32, height: u32, format: TextureFormat, data: &[f32]) -> Self { let context = Context::get_context(); let texture = context.create_texture().unwrap(); context.bind_texture(Context::TEXTURE_2D, &texture); let formatv: u32 = format.into(); context.tex_image2d_f( Context::TEXTURE_2D, 0, Context::RGBA32F as i32, width as i32, height as i32, 0, formatv, Some(data), ); let texture = Texture { texture, _format: format, _type: Context::TEXTURE_2D, }; texture.init(Context::TEXTURE_2D); texture } // Assumes png format pub fn new(width: u32, height: u32, format: TextureFormat, data: Option<&[u8]>) -> Self { let context = Context::get_context(); let texture = context.create_texture().unwrap(); context.bind_texture(Context::TEXTURE_2D, &texture); let formatv: u32 = format.into(); match data { Some(data) => match image::load_from_memory(data).unwrap() { image::ImageRgba8(image) => { context.tex_image2d( Context::TEXTURE_2D, 0, formatv as i32, width as i32, height as i32, 0, formatv, Some(&image.into_raw()[..]), ); } _ => { panic!("Failed to load texture, unsuported pixel format."); } }, _ => context.tex_image2d( Context::TEXTURE_2D, 0, formatv as i32, width as i32, height as i32, 0, formatv, None, ), } let texture = Texture { texture, _format: format, _type: Context::TEXTURE_2D, }; texture.init(Context::TEXTURE_2D); texture } fn init(&self, _type: u32) { let context = Context::get_context(); context.tex_parameteri( _type, Context::TEXTURE_WRAP_S, Context::CLAMP_TO_EDGE as i32, ); context.tex_parameteri( _type, Context::TEXTURE_WRAP_T, Context::CLAMP_TO_EDGE as i32, ); /* Linear filtering usually looks best for text. */ context.tex_parameteri(_type, Context::TEXTURE_MIN_FILTER, Context::NEAREST as i32); context.tex_parameteri(_type, Context::TEXTURE_MAG_FILTER, Context::NEAREST as i32); context.pixel_storei(Context::UNPACK_ALIGNMENT, 1); } pub fn bind(&self) { let context = Context::get_context(); context.bind_texture(self._type, &self.texture); } pub fn activate(&self, shader: Option<&OurShader>, idx: i32, name: &str) { let context = Context::get_context(); context.active_texture(Context::TEXTURE0 + idx as u32); if let Some(shader) = shader { self.bind(); shader.uniform1i(name, idx); } } pub fn unbind(&self) { let context = Context::get_context(); context.unbind_texture(self._type); } pub fn update_sub_rect(&self, x: i32, y: i32, w: i32, h: i32, data: &[u8]) { self.bind(); self.activate(None, 0, "uSampler"); let context = Context::get_context(); //let format = self.format.into(); context.tex_sub_image2d( Context::TEXTURE_2D, 0, x, y, w, h, Context::LUMINANCE, Some(&data), ); self.unbind(); } pub fn get_native(&self) -> &NativeTexture { &self.texture } } impl Into<u32> for TextureFormat { fn into(self) -> u32 { match self { TextureFormat::RGBA => Context::RGBA, TextureFormat::LUMINANCE => Context::LUMINANCE, } } } impl Drop for Texture { fn drop(&mut self) { let context = Context::get_context(); context.delete_texture(&self.texture); } }
use std::{ collections::{hash_map::Entry as HashMapEntry, HashMap, VecDeque}, convert::AsRef, error::Error, fmt, io::{Error as IoError, ErrorKind as IoErrorKind}, net::{SocketAddr, UdpSocket}, ops::Deref, sync::Arc, time::{Duration, Instant}, }; use async_io::Async; use futures_channel::mpsc; use futures_core::Stream; use futures_util::{pin_mut, select, FutureExt, SinkExt, StreamExt}; use http::{header, Response}; use openssl::ssl::SslAcceptor; use rand::thread_rng; use crate::{ buffer_pool::{BufferHandle, BufferPool, OwnedBuffer}, client::{Client, ClientError, MessageType, MAX_UDP_PAYLOAD_SIZE}, crypto::Crypto, interval::Interval, sdp::{gen_sdp_response, parse_sdp_fields, SdpFields}, stun::{parse_stun_binding_request, write_stun_success_response}, util::rand_string, }; #[derive(Debug)] pub enum SendError { /// Non-fatal error trying to send a message to an unknown, disconnected, or not fully /// established client. ClientNotConnected, /// Non-fatal error writing a WebRTC Data Channel message that is too large to fit in the /// maximum message length. IncompleteMessageWrite, /// I/O error on the underlying socket. May or may not be fatal, depending on the specific /// error. Io(IoError), } impl fmt::Display for SendError { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { match self { SendError::ClientNotConnected => write!(f, "client is not connected"), SendError::IncompleteMessageWrite => { write!(f, "incomplete write of WebRTC Data Channel message") } SendError::Io(err) => fmt::Display::fmt(err, f), } } } impl Error for SendError {} impl From<IoError> for SendError { fn from(err: IoError) -> SendError { SendError::Io(err) } } #[derive(Debug)] pub enum SessionError { /// `SessionEndpoint` has beeen disconnected from its `Server` (the `Server` has been dropped). Disconnected, /// An error streaming the SDP descriptor StreamError(Box<dyn Error + Send + Sync + 'static>), } impl fmt::Display for SessionError { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { match self { SessionError::Disconnected => write!(f, "`SessionEndpoint` disconnected from `Server`"), SessionError::StreamError(e) => { write!(f, "error streaming the incoming SDP descriptor: {}", e) } } } } impl Error for SessionError { fn source(&self) -> Option<&(dyn Error + 'static)> { match self { SessionError::Disconnected => None, SessionError::StreamError(e) => Some(e.as_ref()), } } } /// A reference to an internal buffer containing a received message. pub struct MessageBuffer<'a>(BufferHandle<'a>); impl<'a> Deref for MessageBuffer<'a> { type Target = Vec<u8>; fn deref(&self) -> &Vec<u8> { &self.0 } } impl<'a> AsRef<[u8]> for MessageBuffer<'a> { fn as_ref(&self) -> &[u8] { &self.0 } } pub struct MessageResult<'a> { pub message: MessageBuffer<'a>, pub message_type: MessageType, pub remote_addr: SocketAddr, } #[derive(Clone)] pub struct SessionEndpoint { public_addr: SocketAddr, cert_fingerprint: Arc<String>, session_sender: mpsc::Sender<IncomingSession>, } impl SessionEndpoint { /// Receives an incoming SDP descriptor of an `RTCSessionDescription` from a browser, informs /// the corresponding `Server` of the new WebRTC session, and returns a JSON object containing /// objects which can construct an `RTCSessionDescription` and an `RTCIceCandidate` in a /// browser. /// /// The returned JSON object contains a digest of the x509 certificate the server will use for /// DTLS, and the browser will ensure that this digest matches before starting a WebRTC /// connection. pub async fn session_request<I, E, S>( &mut self, sdp_descriptor: S, ) -> Result<String, SessionError> where I: AsRef<[u8]>, E: Error + Send + Sync + 'static, S: Stream<Item = Result<I, E>>, { const SERVER_USER_LEN: usize = 12; const SERVER_PASSWD_LEN: usize = 24; let SdpFields { ice_ufrag, mid, .. } = parse_sdp_fields(sdp_descriptor) .await .map_err(|e| SessionError::StreamError(e.into()))?; let (incoming_session, response) = { let mut rng = thread_rng(); let server_user = rand_string(&mut rng, SERVER_USER_LEN); let server_passwd = rand_string(&mut rng, SERVER_PASSWD_LEN); let incoming_session = IncomingSession { server_user: server_user.clone(), server_passwd: server_passwd.clone(), remote_user: ice_ufrag, }; let response = gen_sdp_response( &mut rng, &self.cert_fingerprint, &self.public_addr.ip().to_string(), self.public_addr.ip().is_ipv6(), self.public_addr.port(), &server_user, &server_passwd, &mid, ); (incoming_session, response) }; self.session_sender .send(incoming_session) .await .map_err(|_| SessionError::Disconnected)?; Ok(response) } /// Convenience method which returns an `http::Response` rather than a JSON string, with the /// correct format headers. pub async fn http_session_request<I, E, S>( &mut self, sdp_descriptor: S, ) -> Result<Response<String>, SessionError> where I: AsRef<[u8]>, E: Error + Send + Sync + 'static, S: Stream<Item = Result<I, E>>, { let r = self.session_request(sdp_descriptor).await?; Ok(Response::builder() .header(header::CONTENT_TYPE, "application/json") .body(r) .expect("could not construct session response")) } } pub struct Server { udp_socket: Async<UdpSocket>, session_endpoint: SessionEndpoint, incoming_session_stream: mpsc::Receiver<IncomingSession>, ssl_acceptor: SslAcceptor, outgoing_udp: VecDeque<(OwnedBuffer, SocketAddr)>, incoming_rtc: VecDeque<(OwnedBuffer, SocketAddr, MessageType)>, buffer_pool: BufferPool, sessions: HashMap<SessionKey, Session>, clients: HashMap<SocketAddr, Client>, last_generate_periodic: Instant, last_cleanup: Instant, periodic_timer: Interval, } impl Server { /// Start a new WebRTC data channel server listening on `listen_addr` and advertising its /// publicly available address as `public_addr`. /// /// WebRTC connections must be started via an external communication channel from a browser via /// the `SessionEndpoint`, after which a WebRTC data channel can be opened. pub async fn new(listen_addr: SocketAddr, public_addr: SocketAddr) -> Result<Server, IoError> { const SESSION_BUFFER_SIZE: usize = 8; let crypto = Crypto::init().expect("WebRTC server could not initialize OpenSSL primitives"); let udp_socket = Async::new(UdpSocket::bind(&listen_addr)?)?; let (session_sender, session_receiver) = mpsc::channel(SESSION_BUFFER_SIZE); log::info!( "new WebRTC data channel server listening on {}, public addr {}", listen_addr, public_addr ); let session_endpoint = SessionEndpoint { public_addr, cert_fingerprint: Arc::new(crypto.fingerprint), session_sender, }; Ok(Server { udp_socket, session_endpoint, incoming_session_stream: session_receiver, ssl_acceptor: crypto.ssl_acceptor, outgoing_udp: VecDeque::new(), incoming_rtc: VecDeque::new(), buffer_pool: BufferPool::new(), sessions: HashMap::new(), clients: HashMap::new(), last_generate_periodic: Instant::now(), last_cleanup: Instant::now(), periodic_timer: Interval::new(PERIODIC_TIMER_INTERVAL), }) } /// Returns a `SessionEndpoint` which can be used to start new WebRTC sessions. /// /// WebRTC connections must be started via an external communication channel from a browser via /// the returned `SessionEndpoint`, and this communication channel will be used to exchange /// session descriptions in SDP format. /// /// The returned `SessionEndpoint` will notify this `Server` of new sessions via a shared async /// channel. This is done so that the `SessionEndpoint` is easy to use in a separate server /// task (such as a `hyper` HTTP server). pub fn session_endpoint(&self) -> SessionEndpoint { self.session_endpoint.clone() } /// The total count of clients in any active state, whether still starting up, fully /// established, or still shutting down. pub fn active_clients(&self) -> usize { self.clients.values().filter(|c| !c.is_shutdown()).count() } /// List all the currently fully established client connections. pub fn connected_clients(&self) -> impl Iterator<Item = &SocketAddr> + '_ { self.clients.iter().filter_map(|(addr, client)| { if client.is_established() { Some(addr) } else { None } }) } /// Returns true if the client has a completely established WebRTC data channel connection and /// can send messages back and forth. Returns false for disconnected clients as well as those /// that are still starting up or are in the process of shutting down. pub fn is_connected(&self, remote_addr: &SocketAddr) -> bool { if let Some(client) = self.clients.get(remote_addr) { client.is_established() } else { false } } /// Disconect the given client, does nothing if the client is not currently connected. pub async fn disconnect(&mut self, remote_addr: &SocketAddr) -> Result<(), IoError> { if let Some(client) = self.clients.get_mut(remote_addr) { match client.start_shutdown() { Ok(true) => { log::info!("starting shutdown for client {}", remote_addr); } Ok(false) => {} Err(err) => { log::warn!( "error starting shutdown for client {}: {}", remote_addr, err ); } } self.outgoing_udp .extend(client.take_outgoing_packets().map(|p| (p, *remote_addr))); self.send_outgoing().await? } Ok(()) } /// Send the given message to the given remote client, if they are connected. /// /// The given message must be less than `MAX_MESSAGE_LEN`. pub async fn send( &mut self, message: &[u8], message_type: MessageType, remote_addr: &SocketAddr, ) -> Result<(), SendError> { let client = self .clients .get_mut(remote_addr) .ok_or(SendError::ClientNotConnected)?; match client.send_message(message_type, message) { Err(ClientError::NotConnected) | Err(ClientError::NotEstablished) => { return Err(SendError::ClientNotConnected).into(); } Err(ClientError::IncompletePacketWrite) => { return Err(SendError::IncompleteMessageWrite).into(); } Err(err) => { log::warn!( "message send for client {} generated unexpected error, shutting down: {}", remote_addr, err ); let _ = client.start_shutdown(); return Err(SendError::ClientNotConnected).into(); } Ok(()) => {} } self.outgoing_udp .extend(client.take_outgoing_packets().map(|p| (p, *remote_addr))); Ok(self.send_outgoing().await?) } /// Receive a WebRTC data channel message from any connected client. /// /// `Server::recv` *must* be called for proper operation of the server, as it also handles /// background tasks such as responding to STUN packets and timing out existing sessions. /// /// If the provided buffer is not large enough to hold the received message, the received /// message will be truncated, and the original length will be returned as part of /// `MessageResult`. pub async fn recv(&mut self) -> Result<MessageResult<'_>, IoError> { while self.incoming_rtc.is_empty() { self.process().await?; } let (message, remote_addr, message_type) = self.incoming_rtc.pop_front().unwrap(); let message = MessageBuffer(self.buffer_pool.adopt(message)); return Ok(MessageResult { message, message_type, remote_addr, }); } // Accepts new incoming WebRTC sessions, times out existing WebRTC sessions, sends outgoing UDP // packets, receives incoming UDP packets, and responds to STUN packets. async fn process(&mut self) -> Result<(), IoError> { enum Next { IncomingSession(IncomingSession), IncomingPacket(usize, SocketAddr), PeriodicTimer, } let mut packet_buffer = self.buffer_pool.acquire(); packet_buffer.resize(MAX_UDP_PAYLOAD_SIZE, 0); let next = { let recv_udp = self.udp_socket.recv_from(&mut packet_buffer).fuse(); pin_mut!(recv_udp); let timer_next = self.periodic_timer.next().fuse(); pin_mut!(timer_next); select! { incoming_session = self.incoming_session_stream.next() => { Next::IncomingSession( incoming_session.expect("connection to SessionEndpoint has closed") ) } res = recv_udp => { let (len, remote_addr) = res?; Next::IncomingPacket(len, remote_addr) } _ = timer_next => { Next::PeriodicTimer } } }; match next { Next::IncomingSession(incoming_session) => { drop(packet_buffer); self.accept_session(incoming_session) } Next::IncomingPacket(len, remote_addr) => { if len > MAX_UDP_PAYLOAD_SIZE { return Err(IoError::new( IoErrorKind::Other, "failed to read entire datagram from socket", )); } packet_buffer.truncate(len); let packet_buffer = packet_buffer.into_owned(); self.receive_packet(remote_addr, packet_buffer); self.send_outgoing().await?; } Next::PeriodicTimer => { drop(packet_buffer); self.timeout_clients(); self.generate_periodic_packets(); self.send_outgoing().await?; } } Ok(()) } // Send all pending outgoing UDP packets async fn send_outgoing(&mut self) -> Result<(), IoError> { while let Some((packet, remote_addr)) = self.outgoing_udp.pop_front() { let packet = self.buffer_pool.adopt(packet); let len = self.udp_socket.send_to(&packet, remote_addr).await?; let packet_len = packet.len(); if len != packet_len { return Err(IoError::new( IoErrorKind::Other, "failed to write entire datagram to socket", )); } } Ok(()) } // Handle a single incoming UDP packet, either by responding to it as a STUN binding request or // by handling it as part of an existing WebRTC connection. fn receive_packet(&mut self, remote_addr: SocketAddr, packet_buffer: OwnedBuffer) { let mut packet_buffer = self.buffer_pool.adopt(packet_buffer); if let Some(stun_binding_request) = parse_stun_binding_request(&packet_buffer[..]) { if let Some(session) = self.sessions.get_mut(&SessionKey { server_user: stun_binding_request.server_user, remote_user: stun_binding_request.remote_user, }) { session.ttl = Instant::now(); packet_buffer.resize(MAX_UDP_PAYLOAD_SIZE, 0); let resp_len = write_stun_success_response( stun_binding_request.transaction_id, remote_addr, session.server_passwd.as_bytes(), &mut packet_buffer, ) .expect("could not write stun response"); packet_buffer.truncate(resp_len); self.outgoing_udp .push_back((packet_buffer.into_owned(), remote_addr)); match self.clients.entry(remote_addr) { HashMapEntry::Vacant(vacant) => { log::info!( "beginning client data channel connection with {}", remote_addr, ); vacant.insert( Client::new(&self.ssl_acceptor, self.buffer_pool.clone(), remote_addr) .expect("could not create new client instance"), ); } HashMapEntry::Occupied(_) => {} } } } else { if let Some(client) = self.clients.get_mut(&remote_addr) { if let Err(err) = client.receive_incoming_packet(packet_buffer.into_owned()) { if !client.shutdown_started() { log::warn!( "client {} had unexpected error receiving UDP packet, shutting down: {}", remote_addr, err ); let _ = client.start_shutdown(); } } self.outgoing_udp .extend(client.take_outgoing_packets().map(|p| (p, remote_addr))); self.incoming_rtc.extend( client .receive_messages() .map(|(message_type, message)| (message, remote_addr, message_type)), ); } } } // Call `Client::generate_periodic` on all clients, if we are due to do so. fn generate_periodic_packets(&mut self) { if self.last_generate_periodic.elapsed() >= PERIODIC_PACKET_INTERVAL { self.last_generate_periodic = Instant::now(); for (remote_addr, client) in &mut self.clients { if let Err(err) = client.generate_periodic() { if !client.shutdown_started() { log::warn!("error for client {}, shutting down: {}", remote_addr, err); let _ = client.start_shutdown(); } } self.outgoing_udp .extend(client.take_outgoing_packets().map(|p| (p, *remote_addr))); } } } // Clean up all client sessions / connections, if we are due to do so. fn timeout_clients(&mut self) { if self.last_cleanup.elapsed() >= CLEANUP_INTERVAL { self.last_cleanup = Instant::now(); self.sessions.retain(|session_key, session| { if session.ttl.elapsed() < RTC_SESSION_TIMEOUT { true } else { log::info!( "session timeout for server user '{}' and remote user '{}'", session_key.server_user, session_key.remote_user ); false } }); self.clients.retain(|remote_addr, client| { if !client.is_shutdown() && client.last_activity().elapsed() < RTC_CONNECTION_TIMEOUT { true } else { if !client.is_shutdown() { log::info!("connection timeout for client {}", remote_addr); } log::info!("client {} removed", remote_addr); false } }); } } fn accept_session(&mut self, incoming_session: IncomingSession) { log::info!( "session initiated with server user: '{}' and remote user: '{}'", incoming_session.server_user, incoming_session.remote_user ); self.sessions.insert( SessionKey { server_user: incoming_session.server_user, remote_user: incoming_session.remote_user, }, Session { server_passwd: incoming_session.server_passwd, ttl: Instant::now(), }, ); } } const RTC_CONNECTION_TIMEOUT: Duration = Duration::from_secs(30); const RTC_SESSION_TIMEOUT: Duration = Duration::from_secs(30); const CLEANUP_INTERVAL: Duration = Duration::from_secs(10); const PERIODIC_PACKET_INTERVAL: Duration = Duration::from_secs(1); const PERIODIC_TIMER_INTERVAL: Duration = Duration::from_secs(1); #[derive(Eq, PartialEq, Hash, Clone, Debug)] struct SessionKey { server_user: String, remote_user: String, } struct Session { server_passwd: String, ttl: Instant, } struct IncomingSession { pub server_user: String, pub server_passwd: String, pub remote_user: String, }
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // ignore-emscripten no threads support #![feature(thread_local_try_with)] use std::thread; static mut DROP_RUN: bool = false; struct Foo; thread_local!(static FOO: Foo = Foo {}); impl Drop for Foo { fn drop(&mut self) { assert!(FOO.try_with(|_| panic!("`try_with` closure run")).is_err()); unsafe { DROP_RUN = true; } } } fn main() { thread::spawn(|| { assert_eq!(FOO.try_with(|_| { 132 }).expect("`try_with` failed"), 132); }).join().unwrap(); assert!(unsafe { DROP_RUN }); }
// Copyright 2021 Datafuse Labs. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. mod call; mod catalog; mod columns; mod copy; mod database; mod explain; mod insert; mod kill; mod presign; mod replace; mod share; mod show; mod stage; mod statement; mod table; mod unset; mod update; mod user; mod view; pub use call::*; pub use catalog::*; pub use columns::*; pub use copy::*; pub use database::*; pub use explain::*; pub use insert::*; pub use kill::*; pub use presign::*; pub use replace::*; pub use share::*; pub use show::*; pub use stage::*; pub use statement::*; pub use table::*; pub use unset::*; pub use update::*; pub use user::*; pub use view::*;
extern crate jlib; use jlib::wallet::wallet::{ WalletType }; use jlib::wallet::builder::generate_wallet; fn main() { let wallet = generate_wallet(WalletType::SECP256K1); println!("new wallet : {:#?}", wallet); }
use std::io::Read; fn read<T: std::str::FromStr>() -> T { let token: String = std::io::stdin() .bytes() .map(|c| c.ok().unwrap() as char) .skip_while(|c| c.is_whitespace()) .take_while(|c| !c.is_whitespace()) .collect(); token.parse().ok().unwrap() } fn main() { let n: i64 = read(); let mut ans: i64 = 0; for x in 0..=n { for y in 0..=n { let z = n - x - y; if z >= 0 && z <= n { ans += 1; } // dbg!((x, y, z)); } } println!("{}", ans); }
#[derive(Default)] pub struct Viewport { width: u32, height: u32, } impl Viewport { pub fn new(width: u32, height: u32) -> Self { Viewport{width, height} } pub fn size(&self) -> (u32, u32) { (self.width, self.height) } pub fn resize(&mut self, width: u32, height: u32) { self.width = width; self.height = height; info!("Resized: {}, {}", &self.width, &self.height); } }
use pyo3::prelude::*; use pyo3::types::{IntoPyDict, PyList}; use n3_program::CodeData; use super::base::{BuildArgs, BuildCode}; use super::out::Outs; impl<'a> BuildCode<'a> for n3_program::NodeCode { type Args = &'a BuildArgs<'a>; type Output = &'a PyAny; fn build(&'a self, py: Python<'a>, args: Self::Args) -> PyResult<Self::Output> { // Step 1. Build the tensor graph let tensor_graph: Vec<_> = self .tensor_graph .iter() .map(|x| x.build(py, &args)) .collect::<PyResult<_>>()?; // Step 2. Instantiate NodeBuilder { data: &self.data, tensor_graph: &tensor_graph, } .build(py) } } pub struct NodeBuilder<'a, 'b> where 'a: 'b, { pub data: &'a CodeData, pub tensor_graph: &'b [&'a PyAny], } impl<'a, 'b> NodeBuilder<'a, 'b> where 'a: 'b, { pub fn build(self, py: Python<'a>) -> PyResult<&'a PyAny> { // Step 1. Build the data let name = self.data.name.as_str().into_py(py); let input = Outs(&self.data.input).into_py_dict(py); let output = Outs(&self.data.output).into_py_dict(py); // Step 2. Build the tensor graph let tensor_graph = PyList::new(py, self.tensor_graph); // Step 3. Instantiate py.import("n3")?.get("node")?.getattr("node")?.call_method( "NodeExecutable", (), Some( [ ("name", name.as_ref(py)), ("input", input), ("output", output), ("tensor_graph", tensor_graph), ] .into_py_dict(py), ), ) } }
//! This module mainly contains functionality replicating the miniz higher level API. use std::{cmp, mem, ptr, slice, usize}; use std::io::Cursor; use libc::{self, c_char, c_int, c_uint, c_ulong, c_void, size_t}; use miniz_oxide::deflate::core::{CompressionStrategy, TDEFLFlush, TDEFLStatus, compress, create_comp_flags_from_zip_params, deflate_flags}; use tdef::tdefl_compressor; use miniz_oxide::inflate::TINFLStatus; use miniz_oxide::inflate::core::{TINFL_LZ_DICT_SIZE, inflate_flags, DecompressorOxide}; use miniz_oxide::*; const MZ_DEFLATED: c_int = 8; const MZ_DEFAULT_WINDOW_BITS: c_int = 15; pub mod return_status { use MZError::*; use miniz_oxide::MZStatus; use libc::c_int; pub const MZ_ERRNO: c_int = ErrNo as c_int; pub const MZ_STREAM_ERROR: c_int = Stream as c_int; pub const MZ_DATA_ERROR: c_int = Data as c_int; pub const MZ_BUF_ERROR: c_int = Buf as c_int; pub const MZ_VERSION_ERROR: c_int = Version as c_int; pub const MZ_PARAM_ERROR: c_int = Param as c_int; pub const MZ_OK: c_int = MZStatus::Ok as c_int; pub const MZ_STREAM_END: c_int = MZStatus::StreamEnd as c_int; pub const MZ_NEED_DICT: c_int = MZStatus::NeedDict as c_int; } pub use self::return_status::*; /// Unused opaque pointer. #[allow(bad_style)] pub enum mz_internal_state {} /// Signature of function used to allocate the compressor/decompressor structs. #[allow(bad_style)] pub type mz_alloc_func = unsafe extern "C" fn(*mut c_void, size_t, size_t) -> *mut c_void; /// Signature of function used to free the compressor/decompressor structs. #[allow(bad_style)] pub type mz_free_func = unsafe extern "C" fn(*mut c_void, *mut c_void); // Only used for zip stuff in miniz, so not sure if we need it for the non-C api parts. /* pub const MZ_CRC32_INIT: c_ulong = 0; pub fn update_crc32(crc32: c_uint, data: &[u8]) -> c_uint { let mut digest = crc32::Digest::new_with_initial(crc32::IEEE, crc32); digest.write(data); digest.sum32() }*/ /// Inner stream state containing pointers to the used buffers and internal state. #[repr(C)] #[derive(Debug)] #[allow(bad_style)] pub struct mz_stream { /// Pointer to the current start of the input buffer. pub next_in: *const u8, /// Length of the input buffer. pub avail_in: c_uint, /// The total number of input bytes consumed so far. pub total_in: c_ulong, /// Pointer to the current start of the output buffer. pub next_out: *mut u8, /// Space in the output buffer. pub avail_out: c_uint, /// The total number of bytes output so far. pub total_out: c_ulong, pub msg: *const c_char, /// Unused pub state: *mut mz_internal_state, /// Allocation function to use for allocating the internal compressor/decompressor. /// Uses `mz_default_alloc_func` if set to `None`. pub zalloc: Option<mz_alloc_func>, /// Free function to use for allocating the internal compressor/decompressor. /// Uses `mz_default_free_func` if `None`. pub zfree: Option<mz_free_func>, /// Extra data to provide the allocation/deallocation functions. /// (Not used for the default ones) pub opaque: *mut c_void, // TODO: Not sure pub data_type: c_int, /// Adler32 checksum of the data that has been compressed or uncompressed. pub adler: c_uint, /// Reserved pub reserved: c_ulong, } impl Default for mz_stream { fn default() -> mz_stream { mz_stream { next_in: ptr::null(), avail_in: 0, total_in: 0, next_out: ptr::null_mut(), avail_out: 0, total_out: 0, msg: ptr::null(), state: ptr::null_mut(), zalloc: None, zfree: None, opaque: ptr::null_mut(), data_type: 0, adler: 0, reserved: 0, } } } pub type MZResult = Result<MZStatus, MZError>; /// Default allocation function using `malloc`. pub unsafe extern "C" fn def_alloc_func( _opaque: *mut c_void, items: size_t, size: size_t, ) -> *mut c_void { libc::malloc(items * size) } /// Default free function using `free`. pub unsafe extern "C" fn def_free_func(_opaque: *mut c_void, address: *mut c_void) { libc::free(address) } /// Trait used for states that can be carried by BoxedState. pub trait StateType { fn drop_state(&mut self); } impl StateType for tdefl_compressor { fn drop_state(&mut self) { self.drop_inner(); } } impl StateType for inflate_state { fn drop_state(&mut self) {} } /// Wrapper for a heap-allocated compressor/decompressor that frees the stucture on drop. struct BoxedState<ST: StateType> { inner: *mut ST, alloc: mz_alloc_func, free: mz_free_func, opaque: *mut c_void, } impl<ST: StateType> Drop for BoxedState<ST> { fn drop(&mut self) { self.free_state(); } } impl<ST: StateType> BoxedState<ST> { pub fn as_mut(&mut self) -> Option<&mut ST> { unsafe { self.inner.as_mut() } } pub fn new(stream: &mut mz_stream) -> Self { BoxedState { inner: stream.state as *mut ST, alloc: stream.zalloc.unwrap_or(def_alloc_func), free: stream.zfree.unwrap_or(def_free_func), opaque: stream.opaque, } } pub fn forget(mut self) -> *mut ST { let state = self.inner; self.inner = ptr::null_mut(); state } fn alloc_state<T>(&mut self) -> MZResult { if !self.inner.is_null() { return Err(MZError::Param); } self.inner = unsafe { (self.alloc)(self.opaque, 1, mem::size_of::<ST>()) as *mut ST }; if self.inner.is_null() { Err(MZError::Mem) } else { Ok(MZStatus::Ok) } } pub fn free_state(&mut self) { if !self.inner.is_null() { unsafe { self.inner.as_mut().map(|i| i.drop_state()); (self.free)(self.opaque, self.inner as *mut c_void) } self.inner = ptr::null_mut(); } } } pub struct StreamOxide<'io, ST: StateType> { pub next_in: Option<&'io [u8]>, pub total_in: c_ulong, pub next_out: Option<&'io mut [u8]>, pub total_out: c_ulong, state: BoxedState<ST>, pub adler: c_uint, } impl<'io, ST: StateType> StreamOxide<'io, ST> { pub unsafe fn new(stream: &mut mz_stream) -> Self { let in_slice = stream.next_in.as_ref().map(|ptr| { slice::from_raw_parts(ptr, stream.avail_in as usize) }); let out_slice = stream.next_out.as_mut().map(|ptr| { slice::from_raw_parts_mut(ptr, stream.avail_out as usize) }); StreamOxide { next_in: in_slice, total_in: stream.total_in, next_out: out_slice, total_out: stream.total_out, state: BoxedState::new(stream), adler: stream.adler, } } pub fn into_mz_stream(mut self) -> mz_stream { mz_stream { next_in: self.next_in.map_or( ptr::null(), |in_slice| in_slice.as_ptr(), ), avail_in: self.next_in.map_or(0, |in_slice| in_slice.len() as c_uint), total_in: self.total_in, next_out: self.next_out.as_mut().map_or( ptr::null_mut(), |out_slice| out_slice.as_mut_ptr(), ), avail_out: self.next_out.as_mut().map_or( 0, |out_slice| out_slice.len() as c_uint, ), total_out: self.total_out, msg: ptr::null(), zalloc: Some(self.state.alloc), zfree: Some(self.state.free), opaque: self.state.opaque, state: self.state.forget() as *mut mz_internal_state, data_type: 0, adler: self.adler, reserved: 0, } } } /// Returns true if the window_bits parameter is valid. fn invalid_window_bits(window_bits: c_int) -> bool { (window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS) } pub fn mz_compress2_oxide( stream_oxide: &mut StreamOxide<tdefl_compressor>, level: c_int, dest_len: &mut c_ulong, ) -> MZResult { mz_deflate_init_oxide(stream_oxide, level)?; let status = mz_deflate_oxide(stream_oxide, MZFlush::Finish as c_int); mz_deflate_end_oxide(stream_oxide)?; match status { Ok(MZStatus::StreamEnd) => { *dest_len = stream_oxide.total_out; Ok(MZStatus::Ok) } Ok(MZStatus::Ok) => Err(MZError::Buf), _ => status, } } /// Initialize the wrapped compressor with the requested level (0-10) and default settings. /// /// The compression level will be set to 6 (default) if the requested level is not available. pub fn mz_deflate_init_oxide( stream_oxide: &mut StreamOxide<tdefl_compressor>, level: c_int, ) -> MZResult { mz_deflate_init2_oxide( stream_oxide, level, MZ_DEFLATED, MZ_DEFAULT_WINDOW_BITS, 9, CompressionStrategy::Default as c_int, ) } /// Initialize the compressor with the requested parameters. /// /// # Params /// stream_oxide: The stream to be initialized. /// level: Compression level (0-10). /// method: Compression method. Only `MZ_DEFLATED` is accepted. /// window_bits: Number of bits used to represent the compression sliding window. /// Only `MZ_DEFAULT_WINDOW_BITS` is currently supported. /// A negative value, i.e `-MZ_DEFAULT_WINDOW_BITS` indicates that the stream /// should be wrapped in a zlib wrapper. /// mem_level: Currently unused. Only values from 1 to and including 9 are accepted. /// strategy: Compression strategy. See `deflate::CompressionStrategy` for accepted options. /// The default, which is used in most cases, is 0. pub fn mz_deflate_init2_oxide( stream_oxide: &mut StreamOxide<tdefl_compressor>, level: c_int, method: c_int, window_bits: c_int, mem_level: c_int, strategy: c_int, ) -> MZResult { let comp_flags = deflate_flags::TDEFL_COMPUTE_ADLER32 as c_uint | create_comp_flags_from_zip_params(level, window_bits, strategy); let invalid_level = (mem_level < 1) || (mem_level > 9); if (method != MZ_DEFLATED) || invalid_level || invalid_window_bits(window_bits) { return Err(MZError::Param); } stream_oxide.adler = MZ_ADLER32_INIT; stream_oxide.total_in = 0; stream_oxide.total_out = 0; stream_oxide.state.alloc_state::<tdefl_compressor>()?; if stream_oxide.state.as_mut().is_none() { mz_deflate_end_oxide(stream_oxide)?; return Err(MZError::Param); } match stream_oxide.state.as_mut() { Some(state) => { unsafe { ptr::write(state, tdefl_compressor::new(comp_flags)); } }, None => unreachable!(), } Ok(MZStatus::Ok) } pub fn mz_deflate_oxide( stream_oxide: &mut StreamOxide<tdefl_compressor>, flush: c_int, ) -> MZResult { let state = stream_oxide.state.as_mut().ok_or(MZError::Stream)?; let next_in = stream_oxide.next_in.as_mut().ok_or(MZError::Stream)?; let next_out = stream_oxide.next_out.as_mut().ok_or(MZError::Stream)?; let flush = MZFlush::new(flush)?; if next_out.is_empty() { return Err(MZError::Buf); } if state.prev_return_status() == TDEFLStatus::Done { return if flush == MZFlush::Finish { Ok(MZStatus::StreamEnd) } else { Err(MZError::Buf) }; } let original_total_in = stream_oxide.total_in; let original_total_out = stream_oxide.total_out; if let Some(compressor) = state.inner.as_mut() { loop { let in_bytes; let out_bytes; let defl_status = { let res = compress(compressor, *next_in, *next_out, TDEFLFlush::from(flush)); in_bytes = res.1; out_bytes = res.2; res.0 }; *next_in = &next_in[in_bytes..]; *next_out = &mut mem::replace(next_out, &mut [])[out_bytes..]; stream_oxide.total_in += in_bytes as c_ulong; stream_oxide.total_out += out_bytes as c_ulong; stream_oxide.adler = compressor.adler32() as c_uint; if defl_status == TDEFLStatus::BadParam || defl_status == TDEFLStatus::PutBufFailed { return Err(MZError::Stream); } if defl_status == TDEFLStatus::Done { return Ok(MZStatus::StreamEnd); } if next_out.is_empty() { return Ok(MZStatus::Ok); } if next_in.is_empty() && (flush != MZFlush::Finish) { let total_changed = (stream_oxide.total_in != original_total_in) || (stream_oxide.total_out != original_total_out); return if (flush != MZFlush::None) || total_changed { Ok(MZStatus::Ok) } else { Err(MZError::Buf) }; } } } else { Err(MZError::Param) } } /// Free the inner compression state. /// /// Currently always returns `MZStatus::Ok`. pub fn mz_deflate_end_oxide(stream_oxide: &mut StreamOxide<tdefl_compressor>) -> MZResult { stream_oxide.state.free_state(); Ok(MZStatus::Ok) } /// Reset the compressor, so it can be used to compress a new set of data. /// /// Returns `MZError::Stream` if the inner stream is missing, otherwise `MZStatus::Ok`. // TODO: probably not covered by tests pub fn mz_deflate_reset_oxide(stream_oxide: &mut StreamOxide<tdefl_compressor>) -> MZResult { let state = stream_oxide.state.as_mut().ok_or(MZError::Stream)?; stream_oxide.total_in = 0; stream_oxide.total_out = 0; state.drop_inner(); *state = tdefl_compressor::new(state.flags() as u32); Ok(MZStatus::Ok) } #[repr(C)] #[allow(bad_style)] pub struct inflate_state { pub m_decomp: DecompressorOxide, pub m_dict_ofs: c_uint, pub m_dict_avail: c_uint, pub m_first_call: c_uint, pub m_has_flushed: c_uint, pub m_window_bits: c_int, pub m_dict: [u8; TINFL_LZ_DICT_SIZE], pub m_last_status: TINFLStatus, } pub fn mz_inflate_init_oxide(stream_oxide: &mut StreamOxide<inflate_state>) -> MZResult { mz_inflate_init2_oxide(stream_oxide, MZ_DEFAULT_WINDOW_BITS) } pub fn mz_inflate_init2_oxide( stream_oxide: &mut StreamOxide<inflate_state>, window_bits: c_int, ) -> MZResult { if invalid_window_bits(window_bits) { return Err(MZError::Param); } stream_oxide.adler = 0; stream_oxide.total_in = 0; stream_oxide.total_out = 0; stream_oxide.state.alloc_state::<inflate_state>()?; let state = stream_oxide.state.as_mut().ok_or(MZError::Mem)?; state.m_decomp.init(); state.m_dict_ofs = 0; state.m_dict_avail = 0; state.m_last_status = TINFLStatus::NeedsMoreInput; state.m_first_call = 1; state.m_has_flushed = 0; state.m_window_bits = window_bits; Ok(MZStatus::Ok) } fn push_dict_out(state: &mut inflate_state, next_out: &mut &mut [u8]) -> c_ulong { let n = cmp::min(state.m_dict_avail as usize, next_out.len()); (next_out[..n]).copy_from_slice( &state.m_dict[state.m_dict_ofs as usize..state.m_dict_ofs as usize + n], ); *next_out = &mut mem::replace(next_out, &mut [])[n..]; state.m_dict_avail -= n as c_uint; state.m_dict_ofs = (state.m_dict_ofs + (n as c_uint)) & ((TINFL_LZ_DICT_SIZE - 1) as c_uint); n as c_ulong } pub fn mz_inflate_oxide(stream_oxide: &mut StreamOxide<inflate_state>, flush: c_int) -> MZResult { let state = stream_oxide.state.as_mut().ok_or(MZError::Stream)?; let next_in = stream_oxide.next_in.as_mut().ok_or(MZError::Stream)?; let next_out = stream_oxide.next_out.as_mut().ok_or(MZError::Stream)?; let flush = MZFlush::new(flush)?; if flush == MZFlush::Full { return Err(MZError::Stream); } let mut decomp_flags = inflate_flags::TINFL_FLAG_COMPUTE_ADLER32; if state.m_window_bits > 0 { decomp_flags |= inflate_flags::TINFL_FLAG_PARSE_ZLIB_HEADER; } let first_call = state.m_first_call; state.m_first_call = 0; if (state.m_last_status as i32) < 0 { return Err(MZError::Data); } if (state.m_has_flushed != 0) && (flush != MZFlush::Finish) { return Err(MZError::Stream); } state.m_has_flushed |= (flush == MZFlush::Finish) as c_uint; let orig_avail_in = next_in.len() as size_t; if (flush == MZFlush::Finish) && (first_call != 0) { decomp_flags |= inflate_flags::TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF; let status = inflate::core::decompress( &mut state.m_decomp, *next_in, &mut Cursor::new(*next_out), decomp_flags, ); let in_bytes = status.1; let out_bytes = status.2; let status = status.0; state.m_last_status = status; *next_in = &next_in[in_bytes..]; *next_out = &mut mem::replace(next_out, &mut [])[out_bytes..]; stream_oxide.total_in += in_bytes as c_ulong; stream_oxide.total_out += out_bytes as c_ulong; // Simply set this to 0 if it doesn't exist. stream_oxide.adler = state.m_decomp.adler32().unwrap_or(0).into(); if (status as i32) < 0 { return Err(MZError::Data); } else if status != TINFLStatus::Done { state.m_last_status = TINFLStatus::Failed; return Err(MZError::Buf); } return Ok(MZStatus::StreamEnd); } if flush != MZFlush::Finish { decomp_flags |= inflate_flags::TINFL_FLAG_HAS_MORE_INPUT; } if state.m_dict_avail != 0 { stream_oxide.total_out += push_dict_out(state, next_out); return if (state.m_last_status == TINFLStatus::Done) && (state.m_dict_avail == 0) { Ok(MZStatus::StreamEnd) } else { Ok(MZStatus::Ok) }; } loop { let status = { let mut out_cursor = Cursor::new(&mut state.m_dict[..]); out_cursor.set_position(state.m_dict_ofs as u64); inflate::core::decompress(&mut state.m_decomp, *next_in, &mut out_cursor, decomp_flags) }; let in_bytes = status.1; let out_bytes = status.2; let status = status.0; state.m_last_status = status; *next_in = &next_in[in_bytes..]; stream_oxide.total_in += in_bytes as c_ulong; state.m_dict_avail = out_bytes as c_uint; stream_oxide.total_out += push_dict_out(state, next_out); stream_oxide.adler = state.m_decomp.adler32().unwrap_or(0).into(); if (status as i32) < 0 { return Err(MZError::Data); } if (status == TINFLStatus::NeedsMoreInput) && (orig_avail_in == 0) { return Err(MZError::Buf); } if flush == MZFlush::Finish { if status == TINFLStatus::Done { return if state.m_dict_avail != 0 { Err(MZError::Buf) } else { Ok(MZStatus::StreamEnd) }; } else if next_out.is_empty() { return Err(MZError::Buf); } } else { let empty_buf = next_in.is_empty() || next_out.is_empty(); if (status == TINFLStatus::Done) || empty_buf || (state.m_dict_avail != 0) { return if (status == TINFLStatus::Done) && (state.m_dict_avail == 0) { Ok(MZStatus::StreamEnd) } else { Ok(MZStatus::Ok) }; } } } } pub fn mz_uncompress2_oxide( stream_oxide: &mut StreamOxide<inflate_state>, dest_len: &mut c_ulong, ) -> MZResult { mz_inflate_init_oxide(stream_oxide)?; let status = mz_inflate_oxide(stream_oxide, MZFlush::Finish as c_int); mz_inflate_end_oxide(stream_oxide)?; let empty_in = stream_oxide.next_in.map_or( true, |next_in| next_in.is_empty(), ); match (status, empty_in) { (Ok(MZStatus::StreamEnd), _) => { *dest_len = stream_oxide.total_out; Ok(MZStatus::Ok) } (Err(MZError::Buf), true) => Err(MZError::Data), (status, _) => status, } } pub fn mz_inflate_end_oxide(stream_oxide: &mut StreamOxide<inflate_state>) -> MZResult { stream_oxide.state.free_state(); Ok(MZStatus::Ok) }
// Copyright (c) 2021 Quark Container Authors / 2018 The gVisor Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. use alloc::vec::Vec; use libc; use nix::sys::stat::Mode; use nix::fcntl::*; use simplelog::*; use std::os::unix::io::FromRawFd; use std::os::unix::io::AsRawFd; use std::fs::File; use kvm_ioctls::Kvm; use std::fs::OpenOptions; use std::path::{Path, PathBuf}; use nix::mount::MsFlags; use std::fs::{canonicalize, create_dir_all}; use nix::unistd::{getcwd}; use serde_json; use std::process::{Command, Stdio}; use super::super::super::qlib::common::*; use super::super::super::qlib::linux_def::*; use super::super::super::qlib::path::*; use super::super::super::util::*; use super::super::super::namespace::*; use super::super::super::console::pty::*; use super::super::super::console::unix_socket::*; use super::super::oci::*; use super::super::container::nix_ext::*; use super::super::container::mounts::*; use super::super::container::container::*; use super::super::cmd::config::*; use super::super::specutils::specutils::*; use super::super::super::ucall::usocket::*; use super::super::super::ucall::ucall::*; use super::util::*; use super::loader::*; use super::vm::*; use super::console::*; use super::signal_handle::*; pub struct NSRestore { pub fd: i32, pub flag: i32, pub typ: LinuxNamespaceType, } impl Drop for NSRestore { fn drop(&mut self) { SetNamespace(self.fd, self.flag).unwrap(); } } #[derive(Serialize, Deserialize, Debug)] pub struct BootArgs { pub eventfd: i32, pub spec: Spec, pub bundleDir: String, pub conf: GlobalConfig, pub userLog: String, pub containerId: String, pub ptyfd: Option<i32>, pub action: RunAction, pub RLimits: Vec<LinuxRlimit>, //pub pid: String, } #[derive(Serialize, Deserialize, Debug)] pub struct SandboxProcess { pub eventfd: i32, pub spec: Spec, pub bundleDir: String, pub conf: GlobalConfig, pub userLog: String, pub containerId: String, pub action: RunAction, pub pivot: bool, pub RLimits: Vec<LinuxRlimit>, pub CloneFlags: i32, pub ToEnterNS: Vec<(i32, i32)>, //mapping from Namespace to namespace fd pub UidMappings: Vec<LinuxIDMapping>, pub GidMappings: Vec<LinuxIDMapping>, pub UserNS: bool, pub CCond: Cond, pub PCond: Cond, pub Rootfs: String, } impl SandboxProcess { pub fn New(gCfg: &GlobalConfig, action: RunAction, id: &str, bundleDir: &str, pivot: bool) -> Result<Self> { let specfile = Join(bundleDir, "config.json"); let mut process = SandboxProcess { eventfd: 0, spec: Spec::load(&specfile).unwrap(), bundleDir: bundleDir.to_string(), conf: gCfg.Copy(), userLog: "".to_string(), containerId: id.to_string(), action: action, pivot: pivot, RLimits: Vec::new(), CloneFlags: 0, ToEnterNS: Vec::new(), UidMappings: Vec::new(), GidMappings: Vec::new(), UserNS: false, CCond: Cond::New()?, PCond: Cond::New()?, Rootfs: "".to_string(), }; let spec = &process.spec; if !IsAbs(&spec.root.path) { process.Rootfs = Join(bundleDir, &spec.root.path); } else { process.Rootfs = spec.root.path.to_string(); } process.CollectNamespaces()?; return Ok(process) } pub fn Run(&self, controlSock: i32) { let id = &self.containerId; let sid = unsafe { //signal (SIGHUP, SIG_IGN); libc::setsid() }; if sid < 0 { panic!("SandboxProcess setsid fail"); } PrepareHandler().unwrap(); let mut config = config::Config::new(); // Add 'Setting.toml' config.merge(config::File::new("Setting", config::FileFormat::Toml).required(false)).unwrap(); let kvmfd = Kvm::open_with_cloexec(false).expect("can't open kvm"); let mut args = Args::default(); args.ID = id.to_string(); args.KvmFd = kvmfd; args.Spec = Spec::from_string(&self.spec.to_string().unwrap()).unwrap(); args.AutoStart = self.action == RunAction::Run; args.BundleDir = self.bundleDir.to_string(); args.Pivot = self.pivot; args.Rootfs = self.Rootfs.clone(); args.ControlSock = controlSock; let exitStatus = match VirtualMachine::Init(args) { Ok(mut vm) => { vm.run().expect("vm.run() fail") } Err(e) => panic!("error is {:?}", e) }; unsafe { libc::_exit(exitStatus) } } pub fn CollectNamespaces(&mut self) -> Result<()> { let mut cf = 0; let spec = &self.spec; let nss = &spec.linux.as_ref().unwrap().namespaces; for ns in nss { //don't use os pid namespace as there is pid namespace support in qkernel if ns.typ == LinuxNamespaceType::pid { continue } let space = ns.typ as i32; if ns.path.len() == 0 { cf |= space; } else { let fd = Open(&ns.path, OFlag::empty(), Mode::empty())?; self.ToEnterNS.push((space, fd)) } } //todo: handle mount ns separated, to avoid crash OS when pivot root cf |= LinuxNamespaceType::mount as i32; if cf & LinuxNamespaceType::user as i32 != 0 { self.UserNS = true; } self.CloneFlags = cf; return Ok(()) } pub fn EnableNamespace(&self) -> Result<()> { let mut mountFd = -1; if self.UserNS { Unshare(CloneOp::CLONE_NEWUSER)?; } self.CCond.Notify()?; self.PCond.Wait()?; if self.UserNS { SetID(0, 0)?; } error!("EnableNamespace ToEnterNS is {:?}", &self.ToEnterNS); for &(space, fd) in &self.ToEnterNS { if space == LinuxNamespaceType::mount as i32 { // enter mount ns last mountFd = fd; continue; } SetNamespace(fd, space)?; Close(fd)?; if space == LinuxNamespaceType::user as i32 { SetID(0, 0)?; } } Unshare(self.CloneFlags & !(LinuxNamespaceType::user as i32))?; if self.CloneFlags & LinuxNamespaceType::mount as i32 != 0 { self.InitRootfs()?; } if mountFd != -1 { SetNamespace(mountFd, LinuxNamespaceType::mount as i32)?; Close(mountFd)?; } return Ok(()) } pub fn InitRootfs(&self) -> Result<()> { let flags = libc::MS_REC | libc::MS_SLAVE; if Util::Mount("","/", "", flags, "") < 0 { panic!("mount root fail") } //println!("rootfs is {}", &self.Rootfs); let ret = Util::Mount(&self.Rootfs, &self.Rootfs, "", libc::MS_REC | libc::MS_BIND, ""); if ret < 0 { panic!("InitRootfs: mount rootfs fail, error is {}", ret); } let spec = &self.spec; let linux = spec.linux.as_ref().unwrap(); for m in &spec.mounts { // TODO: check for nasty destinations involving symlinks and illegal // locations. // NOTE: this strictly is less permissive than runc, which allows .. // as long as the resulting path remains in the rootfs. There // is no good reason to allow this so we just forbid it if !m.destination.starts_with('/') || m.destination.contains("..") { let msg = format!("invalid mount destination: {}", m.destination); return Err(Error::Common(msg)) } let (flags, data) = parse_mount(m); if m.typ == "cgroup" { //mount_cgroups(m, rootfs, flags, &data, &linux.mount_label, cpath)?; // won't mount cgroup continue; } else if m.destination == "/dev" { // dev can't be read only yet because we have to mount devices MountFrom( m, &self.Rootfs, flags & !MsFlags::MS_RDONLY, &data, &linux.mount_label, )?; } else { MountFrom(m, &self.Rootfs, flags, &data, &linux.mount_label)?; } } // chdir into the rootfs so we can make devices with simpler paths let olddir = getcwd().map_err(|e| Error::IOError(format!("io error is {:?}", e)))?; if Util::Chdir(&self.Rootfs) < 0 { panic!("chdir fail") } //default_symlinks()?; create_devices(&linux.devices, false)?; //ensure_ptmx()?; if Util::Chdir(olddir.as_path().to_str().unwrap()) == -1 { panic!("chdir fail") } return Ok(()) } pub fn CreatePipe() -> Result<(i32, i32)> { use libc::*; let mut fds : [i32; 2] = [0, 0]; let ret = unsafe { pipe(&mut fds[0] as * mut i32) }; if ret < 0 { return Err(Error::SysError(errno::errno().0)) } return Ok((fds[0], fds[1])); } pub fn Execv(&self, terminal: bool, consoleSocket: &str, detach: bool) -> Result<(i32, Console)> { use libc::*; let mut cmd = Command::new(&ReadLink(EXE_PATH)?); cmd.arg("boot"); let (fd0, fd1) = Self::CreatePipe()?; unsafe { //enable FD_CLOEXEC for pipefd1 so that it will auto close in child process let ret = fcntl(fd1, F_SETFD, FD_CLOEXEC); if ret < 0 { panic!("fcntl fail"); } }; let mut file1 = unsafe { File::from_raw_fd(fd1) }; cmd.arg("--pipefd"); cmd.arg(&format!("{}", fd0)); let mut ptyMaster = None; if terminal { let (master, slave) = NewPty()?; unsafe { let tty = slave.dup()?; cmd.stdin(Stdio::from_raw_fd(tty)); cmd.stdout(Stdio::from_raw_fd(tty)); cmd.stderr(Stdio::from_raw_fd(tty)); } if !detach { ptyMaster = Some(master); } else { assert!(consoleSocket.len() > 0); let client = UnixSocket::NewClient(consoleSocket)?; client.SendFd(master.as_raw_fd())? } } /*else { if !detach { cmd.stdin(Stdio::piped()); cmd.stdout(Stdio::piped()); cmd.stderr(Stdio::piped()); } }*/ let child = cmd.spawn() .expect("Boot command failed to start"); { //close fd1 let _file0 = unsafe { File::from_raw_fd(fd0) }; } serde_json::to_writer(&mut file1, &self) .map_err(|e| Error::IOError(format!("To BootCmd io::error is {:?}", e)))?; //close files drop(file1); self.Parent(child.id() as i32)?; let console = if detach { Console::Detach } else { if terminal { let ptyConsole = PtyConsole::New(ptyMaster.unwrap()); Console::PtyConsole(ptyConsole) } else { /*let stdin = child.stdin.take().unwrap().into_raw_fd(); let stdout = child.stdout.take().unwrap().into_raw_fd(); let stderr = child.stderr.take().unwrap().into_raw_fd(); let stdioConsole = StdioConsole::New(stdin, stdout, stderr); Console::StdioConsole(stdioConsole)*/ Console::Detach } }; return Ok((child.id() as i32, console)); } pub fn StartLog(&self) { std::fs::remove_file(&self.conf.DebugLog).ok(); CombinedLogger::init( vec![ TermLogger::new(LevelFilter::Error, Config::default(), TerminalMode::Mixed).unwrap(), WriteLogger::new(self.conf.DebugLevel.ToLevelFilter(), Config::default(), File::create(&self.conf.DebugLog).unwrap()), ] ).unwrap(); } pub fn Child(&self) -> Result<()> { //self.StartLog(); // set rlimits (before entering user ns) for rlimit in &self.RLimits { SetRLimit(rlimit.typ as u32, rlimit.soft, rlimit.hard)?; } let addr = ControlSocketAddr(&self.containerId); let controlSock = USocket::CreateServerSocket(&addr).expect("can't create control sock"); self.EnableNamespace()?; self.Run(controlSock); panic!("Child: should never reach here"); } pub fn Parent(&self, child: i32) -> Result<()> { let linux = self.spec.linux.as_ref().unwrap(); self.CCond.Wait()?; if self.UserNS { // write uid/gid map WriteIDMapping( &format!("/proc/{}/uid_map", child), &linux.uid_mappings, )?; WriteIDMapping( &format!("/proc/{}/gid_map", child), &linux.gid_mappings, )?; } self.PCond.Notify()?; return Ok(()) } } fn MountFrom(m: &Mount, rootfs: &str, flags: MsFlags, data: &str, label: &str) -> Result<()> { let d; if !label.is_empty() && m.typ != "proc" && m.typ != "sysfs" { if data.is_empty() { d = format!{"context=\"{}\"", label}; } else { d = format!{"{},context=\"{}\"", data, label}; } } else { d = data.to_string(); } let dest = format!{"{}{}", rootfs, &m.destination}; debug!( "mounting {} to {} as {} with data '{}'", &m.source, &m.destination, &m.typ, &d ); let src = if m.typ == "bind" { let src = canonicalize(&m.source).map_err(|e| Error::IOError(format!("io error is {:?}", e)))?; let dir = if src.is_file() { Path::new(&dest).parent().unwrap() } else { Path::new(&dest) }; if let Err(e) = create_dir_all(&dir) { debug!("ignoring create dir fail of {:?}: {}", &dir, e) } // make sure file exists so we can bind over it if src.is_file() { if let Err(e) = OpenOptions::new().create(true).write(true).open(&dest) { debug!("ignoring touch fail of {:?}: {}", &dest, e) } } src } else { if let Err(e) = create_dir_all(&dest) { debug!("ignoring create dir fail of {:?}: {}", &dest, e) } PathBuf::from(&m.source) }; let ret = Util::Mount(src.as_path().to_str().unwrap(), &dest, &m.typ, flags.bits(), &d); if ret < 0 { if ret == -SysErr::EINVAL { return Err(Error::SysError(-ret as i32)) } // try again without mount label let ret = Util::Mount(src.as_path().to_str().unwrap(), &dest, &m.typ, flags.bits(), ""); if ret < 0 { return Err(Error::SysError(-ret as i32)) } if let Err(e) = setfilecon(&dest, label) { warn!{"could not set mount label of {} to {}: {:?}", &m.destination, &label, e}; } } // remount bind mounts if they have other flags (like MsFlags::MS_RDONLY) if flags.contains(MsFlags::MS_BIND) && flags.intersects( !(MsFlags::MS_REC | MsFlags::MS_REMOUNT | MsFlags::MS_BIND | MsFlags::MS_PRIVATE | MsFlags::MS_SHARED | MsFlags::MS_SLAVE), ) { let ret = Util::Mount(&dest, &dest, "", (flags | MsFlags::MS_REMOUNT).bits(), ""); if ret < 0 { return Err(Error::SysError(-ret as i32)) } } Ok(()) }
pub fn advance_lifetime() { let context = Context("aaa"); let result = parse_context(context); } struct Context<'s>(&'s str); /// lifetime sub-typing /// `'b: 'a` 声明一个不短于`'a`的生命周期`'b` struct Parser<'c, 's: 'c> { context: &'c Context<'s>, } impl<'c, 's> Parser<'c, 's> { fn parse(&self) -> Result<(), &'s str> { Err(&self.context.0[1..]) } } fn parse_context(context: Context) -> Result<(), &str> { Parser { context: &context }.parse() } // error[E0309]: the parameter type `T` may not live long enough //struct Ref<'a, T>(&'a T); /// lifetime bounds struct Ref<'a, T: 'a>(&'a T); struct StaticRef<T: 'static>(&'static T); /// trait lifetime /// - trait 对象的默认生命周期是 'static。 /// - 如果有 &'a X 或 &'a mut X,则默认生命周期是 'a。 /// - 如果只有 T: 'a 从句, 则默认生命周期是 'a。 /// - 如果有多个类似 T: 'a 的从句,则没有默认生命周期;必须明确指定。 trait Red {} struct Ball<'a> { diameter: &'a i32, } impl<'a> Red for Ball<'a> {} fn trait_lifetime() { let num = 5; let obj = Box::new(Ball { diameter: &num }) as Box<Red>; }
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use { cm_fidl_validator, cm_json::{self, cm, Error}, fidl_fuchsia_data as fdata, fidl_fuchsia_sys2 as fsys, serde_json::{Map, Value}, }; /// Converts the contents of a CM file and produces the equivalent FIDL. /// The mapping between CM-JSON and CM-FIDL is 1-1. The only difference is the language semantics /// used to express particular data structures. /// This function also applies cm_fidl_validator to the generated FIDL. pub fn translate(buffer: &str) -> Result<fsys::ComponentDecl, Error> { let document: cm::Document = serde_json::from_str(&buffer)?; let decl = document.cm_into()?; cm_fidl_validator::validate(&decl).map_err(|e| Error::validate_fidl(e))?; Ok(decl) } /// Converts a cm object into its corresponding fidl representation. trait CmInto<T> { fn cm_into(self) -> Result<T, Error>; } impl<T, U> CmInto<Option<Vec<U>>> for Option<Vec<T>> where T: CmInto<U>, { fn cm_into(self) -> Result<Option<Vec<U>>, Error> { self.and_then(|x| if x.is_empty() { None } else { Some(x.cm_into()) }).transpose() } } impl<T, U> CmInto<Vec<U>> for Vec<T> where T: CmInto<U>, { fn cm_into(self) -> Result<Vec<U>, Error> { self.into_iter().map(|x| x.cm_into()).collect() } } impl CmInto<fsys::ComponentDecl> for cm::Document { fn cm_into(self) -> Result<fsys::ComponentDecl, Error> { Ok(fsys::ComponentDecl { program: self.program.cm_into()?, uses: self.uses.cm_into()?, exposes: self.exposes.cm_into()?, offers: self.offers.cm_into()?, children: self.children.cm_into()?, collections: self.collections.cm_into()?, facets: self.facets.cm_into()?, storage: self.storage.cm_into()?, runners: self.runners.cm_into()?, }) } } impl CmInto<fsys::UseDecl> for cm::Use { fn cm_into(self) -> Result<fsys::UseDecl, Error> { Ok(match self { cm::Use::Service(s) => fsys::UseDecl::Service(s.cm_into()?), cm::Use::LegacyService(s) => fsys::UseDecl::LegacyService(s.cm_into()?), cm::Use::Directory(d) => fsys::UseDecl::Directory(d.cm_into()?), cm::Use::Storage(s) => fsys::UseDecl::Storage(s.cm_into()?), cm::Use::Runner(r) => fsys::UseDecl::Runner(r.cm_into()?), }) } } impl CmInto<fsys::ExposeDecl> for cm::Expose { fn cm_into(self) -> Result<fsys::ExposeDecl, Error> { Ok(match self { cm::Expose::Service(s) => fsys::ExposeDecl::Service(s.cm_into()?), cm::Expose::LegacyService(s) => fsys::ExposeDecl::LegacyService(s.cm_into()?), cm::Expose::Directory(d) => fsys::ExposeDecl::Directory(d.cm_into()?), cm::Expose::Runner(r) => fsys::ExposeDecl::Runner(r.cm_into()?), }) } } impl CmInto<fsys::Ref> for cm::ExposeTarget { fn cm_into(self) -> Result<fsys::Ref, Error> { Ok(match self { cm::ExposeTarget::Realm => fsys::Ref::Realm(fsys::RealmRef {}), cm::ExposeTarget::Framework => fsys::Ref::Framework(fsys::FrameworkRef {}), }) } } impl CmInto<fsys::OfferDecl> for cm::Offer { fn cm_into(self) -> Result<fsys::OfferDecl, Error> { Ok(match self { cm::Offer::Service(s) => fsys::OfferDecl::Service(s.cm_into()?), cm::Offer::LegacyService(s) => fsys::OfferDecl::LegacyService(s.cm_into()?), cm::Offer::Directory(d) => fsys::OfferDecl::Directory(d.cm_into()?), cm::Offer::Storage(s) => fsys::OfferDecl::Storage(s.cm_into()?), cm::Offer::Runner(r) => fsys::OfferDecl::Runner(r.cm_into()?), }) } } impl CmInto<fsys::UseServiceDecl> for cm::UseService { fn cm_into(self) -> Result<fsys::UseServiceDecl, Error> { Ok(fsys::UseServiceDecl { source: Some(self.source.cm_into()?), source_path: Some(self.source_path.into()), target_path: Some(self.target_path.into()), }) } } impl CmInto<fsys::UseLegacyServiceDecl> for cm::UseLegacyService { fn cm_into(self) -> Result<fsys::UseLegacyServiceDecl, Error> { Ok(fsys::UseLegacyServiceDecl { source: Some(self.source.cm_into()?), source_path: Some(self.source_path.into()), target_path: Some(self.target_path.into()), }) } } impl CmInto<fsys::UseDirectoryDecl> for cm::UseDirectory { fn cm_into(self) -> Result<fsys::UseDirectoryDecl, Error> { Ok(fsys::UseDirectoryDecl { source: Some(self.source.cm_into()?), source_path: Some(self.source_path.into()), target_path: Some(self.target_path.into()), }) } } impl CmInto<fsys::UseStorageDecl> for cm::UseStorage { fn cm_into(self) -> Result<fsys::UseStorageDecl, Error> { Ok(fsys::UseStorageDecl { type_: Some(self.type_.cm_into()?), target_path: self.target_path.map(|path| path.into()), }) } } impl CmInto<fsys::UseRunnerDecl> for cm::UseRunner { fn cm_into(self) -> Result<fsys::UseRunnerDecl, Error> { Ok(fsys::UseRunnerDecl { source_name: Some(self.source_name.into()) }) } } impl CmInto<fsys::ExposeServiceDecl> for cm::ExposeService { fn cm_into(self) -> Result<fsys::ExposeServiceDecl, Error> { Ok(fsys::ExposeServiceDecl { source: Some(self.source.cm_into()?), source_path: Some(self.source_path.into()), target_path: Some(self.target_path.into()), target: Some(self.target.cm_into()?), }) } } impl CmInto<fsys::ExposeLegacyServiceDecl> for cm::ExposeLegacyService { fn cm_into(self) -> Result<fsys::ExposeLegacyServiceDecl, Error> { Ok(fsys::ExposeLegacyServiceDecl { source: Some(self.source.cm_into()?), source_path: Some(self.source_path.into()), target_path: Some(self.target_path.into()), target: Some(self.target.cm_into()?), }) } } impl CmInto<fsys::ExposeDirectoryDecl> for cm::ExposeDirectory { fn cm_into(self) -> Result<fsys::ExposeDirectoryDecl, Error> { Ok(fsys::ExposeDirectoryDecl { source: Some(self.source.cm_into()?), source_path: Some(self.source_path.into()), target_path: Some(self.target_path.into()), target: Some(self.target.cm_into()?), }) } } impl CmInto<fsys::ExposeRunnerDecl> for cm::ExposeRunner { fn cm_into(self) -> Result<fsys::ExposeRunnerDecl, Error> { Ok(fsys::ExposeRunnerDecl { source: Some(self.source.cm_into()?), source_name: Some(self.source_name.into()), target: Some(self.target.cm_into()?), target_name: Some(self.target_name.into()), }) } } impl CmInto<fsys::OfferServiceDecl> for cm::OfferService { fn cm_into(self) -> Result<fsys::OfferServiceDecl, Error> { Ok(fsys::OfferServiceDecl { source: Some(self.source.cm_into()?), source_path: Some(self.source_path.into()), target: Some(self.target.cm_into()?), target_path: Some(self.target_path.into()), }) } } impl CmInto<fsys::OfferLegacyServiceDecl> for cm::OfferLegacyService { fn cm_into(self) -> Result<fsys::OfferLegacyServiceDecl, Error> { Ok(fsys::OfferLegacyServiceDecl { source: Some(self.source.cm_into()?), source_path: Some(self.source_path.into()), target: Some(self.target.cm_into()?), target_path: Some(self.target_path.into()), }) } } impl CmInto<fsys::OfferDirectoryDecl> for cm::OfferDirectory { fn cm_into(self) -> Result<fsys::OfferDirectoryDecl, Error> { Ok(fsys::OfferDirectoryDecl { source: Some(self.source.cm_into()?), source_path: Some(self.source_path.into()), target: Some(self.target.cm_into()?), target_path: Some(self.target_path.into()), }) } } impl CmInto<fsys::OfferStorageDecl> for cm::OfferStorage { fn cm_into(self) -> Result<fsys::OfferStorageDecl, Error> { Ok(fsys::OfferStorageDecl { type_: Some(self.type_.cm_into()?), source: Some(self.source.cm_into()?), target: Some(self.target.cm_into()?), }) } } impl CmInto<fsys::OfferRunnerDecl> for cm::OfferRunner { fn cm_into(self) -> Result<fsys::OfferRunnerDecl, Error> { Ok(fsys::OfferRunnerDecl { source: Some(self.source.cm_into()?), source_name: Some(self.source_name.into()), target: Some(self.target.cm_into()?), target_name: Some(self.target_name.into()), }) } } impl CmInto<fsys::StorageType> for cm::StorageType { fn cm_into(self) -> Result<fsys::StorageType, Error> { match self { cm::StorageType::Data => Ok(fsys::StorageType::Data), cm::StorageType::Cache => Ok(fsys::StorageType::Cache), cm::StorageType::Meta => Ok(fsys::StorageType::Meta), } } } impl CmInto<fsys::ChildDecl> for cm::Child { fn cm_into(self) -> Result<fsys::ChildDecl, Error> { Ok(fsys::ChildDecl { name: Some(self.name.into()), url: Some(self.url.into()), startup: Some(self.startup.cm_into()?), }) } } impl CmInto<fsys::CollectionDecl> for cm::Collection { fn cm_into(self) -> Result<fsys::CollectionDecl, Error> { Ok(fsys::CollectionDecl { name: Some(self.name.into()), durability: Some(self.durability.cm_into()?), }) } } impl CmInto<fsys::StorageDecl> for cm::Storage { fn cm_into(self) -> Result<fsys::StorageDecl, Error> { Ok(fsys::StorageDecl { name: Some(self.name.into()), source_path: Some(self.source_path.into()), source: Some(self.source.cm_into()?), }) } } impl CmInto<fsys::RunnerDecl> for cm::Runner { fn cm_into(self) -> Result<fsys::RunnerDecl, Error> { Ok(fsys::RunnerDecl { name: Some(self.name.into()), source: Some(self.source.cm_into()?), source_path: Some(self.source_path.into()), }) } } impl CmInto<fsys::RealmRef> for cm::RealmRef { fn cm_into(self) -> Result<fsys::RealmRef, Error> { Ok(fsys::RealmRef {}) } } impl CmInto<fsys::SelfRef> for cm::SelfRef { fn cm_into(self) -> Result<fsys::SelfRef, Error> { Ok(fsys::SelfRef {}) } } impl CmInto<fsys::ChildRef> for cm::ChildRef { fn cm_into(self) -> Result<fsys::ChildRef, Error> { Ok(fsys::ChildRef { name: self.name.into(), collection: None }) } } impl CmInto<fsys::CollectionRef> for cm::CollectionRef { fn cm_into(self) -> Result<fsys::CollectionRef, Error> { Ok(fsys::CollectionRef { name: self.name.into() }) } } impl CmInto<fsys::StorageRef> for cm::StorageRef { fn cm_into(self) -> Result<fsys::StorageRef, Error> { Ok(fsys::StorageRef { name: self.name.into() }) } } impl CmInto<fsys::FrameworkRef> for cm::FrameworkRef { fn cm_into(self) -> Result<fsys::FrameworkRef, Error> { Ok(fsys::FrameworkRef {}) } } impl CmInto<fsys::Ref> for cm::Ref { fn cm_into(self) -> Result<fsys::Ref, Error> { Ok(match self { cm::Ref::Realm(r) => fsys::Ref::Realm(r.cm_into()?), cm::Ref::Self_(s) => fsys::Ref::Self_(s.cm_into()?), cm::Ref::Child(c) => fsys::Ref::Child(c.cm_into()?), cm::Ref::Collection(c) => fsys::Ref::Collection(c.cm_into()?), cm::Ref::Storage(r) => fsys::Ref::Storage(r.cm_into()?), cm::Ref::Framework(f) => fsys::Ref::Framework(f.cm_into()?), }) } } impl CmInto<fsys::Durability> for cm::Durability { fn cm_into(self) -> Result<fsys::Durability, Error> { Ok(match self { cm::Durability::Persistent => fsys::Durability::Persistent, cm::Durability::Transient => fsys::Durability::Transient, }) } } impl CmInto<fsys::StartupMode> for cm::StartupMode { fn cm_into(self) -> Result<fsys::StartupMode, Error> { Ok(match self { cm::StartupMode::Lazy => fsys::StartupMode::Lazy, cm::StartupMode::Eager => fsys::StartupMode::Eager, }) } } impl CmInto<Option<fdata::Dictionary>> for Option<Map<String, Value>> { fn cm_into(self) -> Result<Option<fdata::Dictionary>, Error> { match self { Some(from) => { let dict = dictionary_from_map(from)?; Ok(Some(dict)) } None => Ok(None), } } } fn dictionary_from_map(in_obj: Map<String, Value>) -> Result<fdata::Dictionary, Error> { let mut out = fdata::Dictionary { entries: vec![] }; for (k, v) in in_obj { if let Some(value) = convert_value(v)? { out.entries.push(fdata::Entry { key: k, value: Some(value) }); } } Ok(out) } fn convert_value(v: Value) -> Result<Option<Box<fdata::Value>>, Error> { Ok(match v { Value::Null => None, Value::Bool(b) => Some(Box::new(fdata::Value::Bit(b))), Value::Number(n) => { if let Some(i) = n.as_i64() { Some(Box::new(fdata::Value::Inum(i))) } else if let Some(f) = n.as_f64() { Some(Box::new(fdata::Value::Fnum(f))) } else { return Err(Error::Parse(format!("Number is out of range: {}", n))); } } Value::String(s) => Some(Box::new(fdata::Value::Str(s.clone()))), Value::Array(a) => { let mut values = vec![]; for v in a { if let Some(value) = convert_value(v)? { values.push(Some(value)); } } let vector = fdata::Vector { values }; Some(Box::new(fdata::Value::Vec(vector))) } Value::Object(o) => { let dict = dictionary_from_map(o)?; Some(Box::new(fdata::Value::Dict(dict))) } }) } #[cfg(test)] mod tests { use super::*; use serde_json::json; use test_util::assert_matches; fn translate_test(input: serde_json::value::Value, expected_output: fsys::ComponentDecl) { let component_decl = translate(&format!("{}", input)).expect("translation failed"); assert_eq!(component_decl, expected_output); } fn new_component_decl() -> fsys::ComponentDecl { fsys::ComponentDecl { program: None, uses: None, exposes: None, offers: None, facets: None, children: None, collections: None, storage: None, runners: None, } } macro_rules! test_translate { ( $( $test_name:ident => { input = $input:expr, output = $output:expr, }, )+ ) => { $( #[test] fn $test_name() { translate_test($input, $output); } )+ } } #[test] fn test_translate_invalid_cm_fails() { let input = json!({ "exposes": [ { } ] }); let res = translate(&format!("{}", input)); assert_matches!(res, Err(Error::Parse(_))); } test_translate! { test_translate_empty => { input = json!({}), output = new_component_decl(), }, test_translate_program => { input = json!({ "program": { "binary": "bin/app" } }), output = { let program = fdata::Dictionary{entries: vec![ fdata::Entry{ key: "binary".to_string(), value: Some(Box::new(fdata::Value::Str("bin/app".to_string()))), } ]}; let mut decl = new_component_decl(); decl.program = Some(program); decl }, }, test_translate_dictionary_primitive => { input = json!({ "program": { "string": "bar", "int": -42, "float": 3.14, "bool": true, "ignore": null } }), output = { let program = fdata::Dictionary{entries: vec![ fdata::Entry{ key: "bool".to_string(), value: Some(Box::new(fdata::Value::Bit(true))), }, fdata::Entry{ key: "float".to_string(), value: Some(Box::new(fdata::Value::Fnum(3.14))), }, fdata::Entry{ key: "int".to_string(), value: Some(Box::new(fdata::Value::Inum(-42))), }, fdata::Entry{ key: "string".to_string(), value: Some(Box::new(fdata::Value::Str("bar".to_string()))), }, ]}; let mut decl = new_component_decl(); decl.program = Some(program); decl }, }, test_translate_dictionary_nested => { input = json!({ "program": { "obj": { "array": [ { "string": "bar" }, -42 ], }, "bool": true } }), output = { let dict_inner = fdata::Dictionary{entries: vec![ fdata::Entry{ key: "string".to_string(), value: Some(Box::new(fdata::Value::Str("bar".to_string()))), }, ]}; let vector = fdata::Vector{values: vec![ Some(Box::new(fdata::Value::Dict(dict_inner))), Some(Box::new(fdata::Value::Inum(-42))) ]}; let dict_outer = fdata::Dictionary{entries: vec![ fdata::Entry{ key: "array".to_string(), value: Some(Box::new(fdata::Value::Vec(vector))), }, ]}; let program = fdata::Dictionary{entries: vec![ fdata::Entry{ key: "bool".to_string(), value: Some(Box::new(fdata::Value::Bit(true))), }, fdata::Entry{ key: "obj".to_string(), value: Some(Box::new(fdata::Value::Dict(dict_outer))), }, ]}; let mut decl = new_component_decl(); decl.program = Some(program); decl }, }, test_translate_uses => { input = json!({ "uses": [ { "service": { "source": { "realm": {} }, "source_path": "/fonts/CoolFonts", "target_path": "/svc/fuchsia.fonts.Provider" } }, { "service": { "source": { "framework": {} }, "source_path": "/svc/fuchsia.sys2.Realm", "target_path": "/svc/fuchsia.sys2.Realm" } }, { "legacy_service": { "source": { "realm": {} }, "source_path": "/fonts/CoolFonts", "target_path": "/svc/fuchsia.fonts.Provider" } }, { "legacy_service": { "source": { "framework": {} }, "source_path": "/svc/fuchsia.sys2.Realm", "target_path": "/svc/fuchsia.sys2.Realm" } }, { "directory": { "source": { "realm": {} }, "source_path": "/data/assets", "target_path": "/data" } }, { "directory": { "source": { "framework": {} }, "source_path": "/pkg", "target_path": "/pkg" } }, { "storage": { "type": "cache", "target_path": "/cache" } }, { "runner": { "source_name": "elf" } } ] }), output = { let uses = vec![ fsys::UseDecl::Service(fsys::UseServiceDecl { source: Some(fsys::Ref::Realm(fsys::RealmRef {})), source_path: Some("/fonts/CoolFonts".to_string()), target_path: Some("/svc/fuchsia.fonts.Provider".to_string()), }), fsys::UseDecl::Service(fsys::UseServiceDecl { source: Some(fsys::Ref::Framework(fsys::FrameworkRef {})), source_path: Some("/svc/fuchsia.sys2.Realm".to_string()), target_path: Some("/svc/fuchsia.sys2.Realm".to_string()), }), fsys::UseDecl::LegacyService(fsys::UseLegacyServiceDecl { source: Some(fsys::Ref::Realm(fsys::RealmRef {})), source_path: Some("/fonts/CoolFonts".to_string()), target_path: Some("/svc/fuchsia.fonts.Provider".to_string()), }), fsys::UseDecl::LegacyService(fsys::UseLegacyServiceDecl { source: Some(fsys::Ref::Framework(fsys::FrameworkRef {})), source_path: Some("/svc/fuchsia.sys2.Realm".to_string()), target_path: Some("/svc/fuchsia.sys2.Realm".to_string()), }), fsys::UseDecl::Directory(fsys::UseDirectoryDecl { source: Some(fsys::Ref::Realm(fsys::RealmRef {})), source_path: Some("/data/assets".to_string()), target_path: Some("/data".to_string()), }), fsys::UseDecl::Directory(fsys::UseDirectoryDecl { source: Some(fsys::Ref::Framework(fsys::FrameworkRef {})), source_path: Some("/pkg".to_string()), target_path: Some("/pkg".to_string()), }), fsys::UseDecl::Storage(fsys::UseStorageDecl { type_: Some(fsys::StorageType::Cache), target_path: Some("/cache".to_string()), }), fsys::UseDecl::Runner(fsys::UseRunnerDecl { source_name: Some("elf".to_string()), }), ]; let mut decl = new_component_decl(); decl.uses = Some(uses); decl }, }, test_translate_exposes => { input = json!({ "exposes": [ { "service": { "source": { "child": { "name": "logger" } }, "source_path": "/loggers/fuchsia.logger.Log1", "target_path": "/svc/fuchsia.logger.Log", "target": "realm" } }, { "service": { "source": { "self": {} }, "source_path": "/loggers/fuchsia.logger.Log2", "target_path": "/svc/fuchsia.logger.Log", "target": "realm" } }, { "legacy_service": { "source": { "child": { "name": "logger" } }, "source_path": "/loggers/fuchsia.logger.LegacyLog", "target_path": "/svc/fuchsia.logger.LegacyLog", "target": "realm" } }, { "directory": { "source": { "self": {} }, "source_path": "/volumes/blobfs", "target_path": "/volumes/blobfs", "target": "framework" } }, { "runner": { "source": { "child": { "name": "logger" } }, "source_name": "elf", "target": "realm", "target_name": "elf" } } ], "children": [ { "name": "logger", "url": "fuchsia-pkg://fuchsia.com/logger/stable#meta/logger.cm", "startup": "lazy" } ] }), output = { let exposes = vec![ fsys::ExposeDecl::Service(fsys::ExposeServiceDecl { source_path: Some("/loggers/fuchsia.logger.Log1".to_string()), source: Some(fsys::Ref::Child(fsys::ChildRef { name: "logger".to_string(), collection: None, })), target_path: Some("/svc/fuchsia.logger.Log".to_string()), target: Some(fsys::Ref::Realm(fsys::RealmRef {})), }), fsys::ExposeDecl::Service(fsys::ExposeServiceDecl { source_path: Some("/loggers/fuchsia.logger.Log2".to_string()), source: Some(fsys::Ref::Self_(fsys::SelfRef {})), target_path: Some("/svc/fuchsia.logger.Log".to_string()), target: Some(fsys::Ref::Realm(fsys::RealmRef {})), }), fsys::ExposeDecl::LegacyService(fsys::ExposeLegacyServiceDecl { source_path: Some("/loggers/fuchsia.logger.LegacyLog".to_string()), source: Some(fsys::Ref::Child(fsys::ChildRef { name: "logger".to_string(), collection: None, })), target_path: Some("/svc/fuchsia.logger.LegacyLog".to_string()), target: Some(fsys::Ref::Realm(fsys::RealmRef {})), }), fsys::ExposeDecl::Directory(fsys::ExposeDirectoryDecl { source_path: Some("/volumes/blobfs".to_string()), source: Some(fsys::Ref::Self_(fsys::SelfRef{})), target_path: Some("/volumes/blobfs".to_string()), target: Some(fsys::Ref::Framework(fsys::FrameworkRef {})), }), fsys::ExposeDecl::Runner(fsys::ExposeRunnerDecl { source_name: Some("elf".to_string()), source: Some(fsys::Ref::Child(fsys::ChildRef{ name: "logger".to_string(), collection: None, })), target_name: Some("elf".to_string()), target: Some(fsys::Ref::Realm(fsys::RealmRef {})), }), ]; let children = vec![ fsys::ChildDecl{ name: Some("logger".to_string()), url: Some("fuchsia-pkg://fuchsia.com/logger/stable#meta/logger.cm".to_string()), startup: Some(fsys::StartupMode::Lazy), }, ]; let mut decl = new_component_decl(); decl.exposes = Some(exposes); decl.children = Some(children); decl }, }, test_translate_offers => { input = json!({ "offers": [ { "directory": { "source": { "realm": {} }, "source_path": "/data/assets", "target": { "child": { "name": "logger" } }, "target_path": "/data/realm_assets" }, }, { "directory": { "source": { "self": {} }, "source_path": "/data/config", "target": { "collection": { "name": "modular" } }, "target_path": "/data/config" } }, { "service": { "source": { "self": {} }, "source_path": "/svc/fuchsia.netstack.Netstack", "target": { "child": { "name": "logger" } }, "target_path": "/svc/fuchsia.netstack.Netstack" } }, { "service": { "source": { "child": { "name": "logger" } }, "source_path": "/svc/fuchsia.logger.Log1", "target": { "collection": { "name": "modular" } }, "target_path": "/svc/fuchsia.logger.Log" } }, { "service": { "source": { "self": {} }, "source_path": "/svc/fuchsia.logger.Log2", "target": { "collection": { "name": "modular" } }, "target_path": "/svc/fuchsia.logger.Log" } }, { "legacy_service": { "source": { "self": {} }, "source_path": "/svc/fuchsia.netstack.LegacyNetstack", "target": { "child": { "name": "logger" } }, "target_path": "/svc/fuchsia.netstack.LegacyNetstack" } }, { "legacy_service": { "source": { "child": { "name": "logger" } }, "source_path": "/svc/fuchsia.logger.LegacyLog", "target": { "collection": { "name": "modular" } }, "target_path": "/svc/fuchsia.logger.LegacySysLog" } }, { "storage": { "type": "data", "source": { "storage": { "name": "memfs" } }, "target": { "collection": { "name": "modular" } } } }, { "storage": { "type": "data", "source": { "storage": { "name": "memfs" } }, "target": { "child": { "name": "logger" } } } }, { "storage": { "type": "meta", "source": { "realm": {} }, "target": { "collection": { "name": "modular" } } } }, { "storage": { "type": "meta", "source": { "realm": {} }, "target": { "child": { "name": "logger" } } } }, { "runner": { "source": { "self": {} }, "source_name": "elf", "target": { "child": { "name": "logger" } }, "target_name": "elf" } }, ], "children": [ { "name": "logger", "url": "fuchsia-pkg://fuchsia.com/logger/stable#meta/logger.cm", "startup": "lazy" }, { "name": "netstack", "url": "fuchsia-pkg://fuchsia.com/netstack/stable#meta/netstack.cm", "startup": "eager" } ], "collections": [ { "name": "modular", "durability": "persistent" } ], "storage": [ { "name": "memfs", "source_path": "/memfs", "source": { "self": {} } } ] }), output = { let offers = vec![ fsys::OfferDecl::Directory(fsys::OfferDirectoryDecl { source: Some(fsys::Ref::Realm(fsys::RealmRef {})), source_path: Some("/data/assets".to_string()), target: Some(fsys::Ref::Child( fsys::ChildRef { name: "logger".to_string(), collection: None, } )), target_path: Some("/data/realm_assets".to_string()), }), fsys::OfferDecl::Directory(fsys::OfferDirectoryDecl { source: Some(fsys::Ref::Self_(fsys::SelfRef {})), source_path: Some("/data/config".to_string()), target: Some(fsys::Ref::Collection( fsys::CollectionRef { name: "modular".to_string(), } )), target_path: Some("/data/config".to_string()), }), fsys::OfferDecl::Service(fsys::OfferServiceDecl { source: Some(fsys::Ref::Self_(fsys::SelfRef {})), source_path: Some("/svc/fuchsia.netstack.Netstack".to_string()), target: Some(fsys::Ref::Child( fsys::ChildRef { name: "logger".to_string(), collection: None, } )), target_path: Some("/svc/fuchsia.netstack.Netstack".to_string()), }), fsys::OfferDecl::Service(fsys::OfferServiceDecl { source: Some(fsys::Ref::Child(fsys::ChildRef { name: "logger".to_string(), collection: None, })), source_path: Some("/svc/fuchsia.logger.Log1".to_string()), target: Some(fsys::Ref::Collection( fsys::CollectionRef { name: "modular".to_string(), } )), target_path: Some("/svc/fuchsia.logger.Log".to_string()), }), fsys::OfferDecl::Service(fsys::OfferServiceDecl { source: Some(fsys::Ref::Self_(fsys::SelfRef {})), source_path: Some("/svc/fuchsia.logger.Log2".to_string()), target: Some(fsys::Ref::Collection( fsys::CollectionRef { name: "modular".to_string(), } )), target_path: Some("/svc/fuchsia.logger.Log".to_string()), }), fsys::OfferDecl::LegacyService(fsys::OfferLegacyServiceDecl { source: Some(fsys::Ref::Self_(fsys::SelfRef {})), source_path: Some("/svc/fuchsia.netstack.LegacyNetstack".to_string()), target: Some(fsys::Ref::Child( fsys::ChildRef { name: "logger".to_string(), collection: None, } )), target_path: Some("/svc/fuchsia.netstack.LegacyNetstack".to_string()), }), fsys::OfferDecl::LegacyService(fsys::OfferLegacyServiceDecl { source: Some(fsys::Ref::Child(fsys::ChildRef { name: "logger".to_string(), collection: None, })), source_path: Some("/svc/fuchsia.logger.LegacyLog".to_string()), target: Some(fsys::Ref::Collection( fsys::CollectionRef { name: "modular".to_string(), } )), target_path: Some("/svc/fuchsia.logger.LegacySysLog".to_string()), }), fsys::OfferDecl::Storage(fsys::OfferStorageDecl { type_: Some(fsys::StorageType::Data), source: Some(fsys::Ref::Storage(fsys::StorageRef { name: "memfs".to_string(), })), target: Some(fsys::Ref::Collection( fsys::CollectionRef { name: "modular".to_string() } )), }), fsys::OfferDecl::Storage(fsys::OfferStorageDecl { type_: Some(fsys::StorageType::Data), source: Some(fsys::Ref::Storage(fsys::StorageRef { name: "memfs".to_string(), })), target: Some(fsys::Ref::Child( fsys::ChildRef { name: "logger".to_string(), collection: None } )), }), fsys::OfferDecl::Storage(fsys::OfferStorageDecl { type_: Some(fsys::StorageType::Meta), source: Some(fsys::Ref::Realm(fsys::RealmRef { })), target: Some(fsys::Ref::Collection( fsys::CollectionRef { name: "modular".to_string() } )), }), fsys::OfferDecl::Storage(fsys::OfferStorageDecl { type_: Some(fsys::StorageType::Meta), source: Some(fsys::Ref::Realm(fsys::RealmRef { })), target: Some(fsys::Ref::Child( fsys::ChildRef { name: "logger".to_string(), collection: None } )), }), fsys::OfferDecl::Runner(fsys::OfferRunnerDecl { source: Some(fsys::Ref::Self_(fsys::SelfRef {})), source_name: Some("elf".to_string()), target: Some(fsys::Ref::Child( fsys::ChildRef { name: "logger".to_string(), collection: None, } )), target_name: Some("elf".to_string()), }), ]; let children = vec![ fsys::ChildDecl{ name: Some("logger".to_string()), url: Some("fuchsia-pkg://fuchsia.com/logger/stable#meta/logger.cm".to_string()), startup: Some(fsys::StartupMode::Lazy), }, fsys::ChildDecl{ name: Some("netstack".to_string()), url: Some("fuchsia-pkg://fuchsia.com/netstack/stable#meta/netstack.cm".to_string()), startup: Some(fsys::StartupMode::Eager), }, ]; let collections = vec![ fsys::CollectionDecl{ name: Some("modular".to_string()), durability: Some(fsys::Durability::Persistent), }, ]; let storages = vec![ fsys::StorageDecl { name: Some("memfs".to_string()), source_path: Some("/memfs".to_string()), source: Some(fsys::Ref::Self_(fsys::SelfRef{})), }, ]; let mut decl = new_component_decl(); decl.offers = Some(offers); decl.children = Some(children); decl.collections = Some(collections); decl.storage = Some(storages); decl }, }, test_translate_children => { input = json!({ "children": [ { "name": "logger", "url": "fuchsia-pkg://fuchsia.com/logger/stable#meta/logger.cm", "startup": "lazy" }, { "name": "echo_server", "url": "fuchsia-pkg://fuchsia.com/echo_server/stable#meta/echo_server.cm", "startup": "eager" } ] }), output = { let children = vec![ fsys::ChildDecl{ name: Some("logger".to_string()), url: Some("fuchsia-pkg://fuchsia.com/logger/stable#meta/logger.cm".to_string()), startup: Some(fsys::StartupMode::Lazy), }, fsys::ChildDecl{ name: Some("echo_server".to_string()), url: Some("fuchsia-pkg://fuchsia.com/echo_server/stable#meta/echo_server.cm".to_string()), startup: Some(fsys::StartupMode::Eager), }, ]; let mut decl = new_component_decl(); decl.children = Some(children); decl }, }, test_translate_collections => { input = json!({ "collections": [ { "name": "modular", "durability": "persistent" }, { "name": "tests", "durability": "transient" } ] }), output = { let collections = vec![ fsys::CollectionDecl{ name: Some("modular".to_string()), durability: Some(fsys::Durability::Persistent), }, fsys::CollectionDecl{ name: Some("tests".to_string()), durability: Some(fsys::Durability::Transient), }, ]; let mut decl = new_component_decl(); decl.collections = Some(collections); decl }, }, test_translate_facets => { input = json!({ "facets": { "authors": [ "me", "you" ], "title": "foo", "year": 2018 } }), output = { let vector = fdata::Vector{values: vec![ Some(Box::new(fdata::Value::Str("me".to_string()))), Some(Box::new(fdata::Value::Str("you".to_string()))), ]}; let facets = fdata::Dictionary{entries: vec![ fdata::Entry{ key: "authors".to_string(), value: Some(Box::new(fdata::Value::Vec(vector))), }, fdata::Entry{ key: "title".to_string(), value: Some(Box::new(fdata::Value::Str("foo".to_string()))), }, fdata::Entry{ key: "year".to_string(), value: Some(Box::new(fdata::Value::Inum(2018))), }, ]}; let mut decl = new_component_decl(); decl.facets = Some(facets); decl }, }, test_translate_storage => { input = json!({ "storage": [ { "name": "memfs", "source": { "self": {} }, "source_path": "/memfs" } ] }), output = { let storages = vec![ fsys::StorageDecl { name: Some("memfs".to_string()), source_path: Some("/memfs".to_string()), source: Some(fsys::Ref::Self_(fsys::SelfRef{})), }, ]; let mut decl = new_component_decl(); decl.storage = Some(storages); decl }, }, test_translate_runners => { input = json!({ "runners": [ { "name": "elf", "source": { "self": {} }, "source_path": "/elf" } ] }), output = { let runners = vec![ fsys::RunnerDecl { name: Some("elf".to_string()), source_path: Some("/elf".to_string()), source: Some(fsys::Ref::Self_(fsys::SelfRef{})), }, ]; let mut decl = new_component_decl(); decl.runners = Some(runners); decl }, }, test_translate_all_sections => { input = json!({ "program": { "binary": "bin/app" }, "uses": [ { "service": { "source": { "realm": {} }, "source_path": "/fonts/CoolFonts", "target_path": "/svc/fuchsia.fonts.Provider" } } ], "exposes": [ { "directory": { "source": { "self": {} }, "source_path": "/volumes/blobfs", "target_path": "/volumes/blobfs", "target": "realm" } } ], "offers": [ { "service": { "source": { "child": { "name": "logger" } }, "source_path": "/svc/fuchsia.logger.Log", "target": { "child": { "name": "netstack" } }, "target_path": "/svc/fuchsia.logger.Log" } } ], "children": [ { "name": "logger", "url": "fuchsia-pkg://fuchsia.com/logger/stable#meta/logger.cm", "startup": "lazy" }, { "name": "netstack", "url": "fuchsia-pkg://fuchsia.com/netstack/stable#meta/netstack.cm", "startup": "eager" } ], "collections": [ { "name": "modular", "durability": "persistent" } ], "facets": { "author": "Fuchsia", "year": 2018 }, "storage": [ { "name": "memfs", "source_path": "/memfs", "source": { "self": {} } } ], "runners": [ { "name": "elf", "source": { "self": {} }, "source_path": "/elf" } ] }), output = { let program = fdata::Dictionary {entries: vec![ fdata::Entry { key: "binary".to_string(), value: Some(Box::new(fdata::Value::Str("bin/app".to_string()))), }, ]}; let uses = vec![ fsys::UseDecl::Service(fsys::UseServiceDecl { source: Some(fsys::Ref::Realm(fsys::RealmRef {})), source_path: Some("/fonts/CoolFonts".to_string()), target_path: Some("/svc/fuchsia.fonts.Provider".to_string()), }), ]; let exposes = vec![ fsys::ExposeDecl::Directory(fsys::ExposeDirectoryDecl { source: Some(fsys::Ref::Self_(fsys::SelfRef{})), source_path: Some("/volumes/blobfs".to_string()), target_path: Some("/volumes/blobfs".to_string()), target: Some(fsys::Ref::Realm(fsys::RealmRef {})), }), ]; let offers = vec![ fsys::OfferDecl::Service(fsys::OfferServiceDecl { source: Some(fsys::Ref::Child(fsys::ChildRef { name: "logger".to_string(), collection: None, })), source_path: Some("/svc/fuchsia.logger.Log".to_string()), target: Some(fsys::Ref::Child( fsys::ChildRef { name: "netstack".to_string(), collection: None, } )), target_path: Some("/svc/fuchsia.logger.Log".to_string()), }), ]; let children = vec![ fsys::ChildDecl { name: Some("logger".to_string()), url: Some("fuchsia-pkg://fuchsia.com/logger/stable#meta/logger.cm".to_string()), startup: Some(fsys::StartupMode::Lazy), }, fsys::ChildDecl { name: Some("netstack".to_string()), url: Some("fuchsia-pkg://fuchsia.com/netstack/stable#meta/netstack.cm".to_string()), startup: Some(fsys::StartupMode::Eager), }, ]; let collections = vec![ fsys::CollectionDecl { name: Some("modular".to_string()), durability: Some(fsys::Durability::Persistent), }, ]; let facets = fdata::Dictionary {entries: vec![ fdata::Entry { key: "author".to_string(), value: Some(Box::new(fdata::Value::Str("Fuchsia".to_string()))), }, fdata::Entry { key: "year".to_string(), value: Some(Box::new(fdata::Value::Inum(2018))), }, ]}; let storages = vec![ fsys::StorageDecl { name: Some("memfs".to_string()), source_path: Some("/memfs".to_string()), source: Some(fsys::Ref::Self_(fsys::SelfRef{})), }, ]; let runners = vec![ fsys::RunnerDecl { name: Some("elf".to_string()), source: Some(fsys::Ref::Self_(fsys::SelfRef{})), source_path: Some("/elf".to_string()), }, ]; fsys::ComponentDecl { program: Some(program), uses: Some(uses), exposes: Some(exposes), offers: Some(offers), children: Some(children), collections: Some(collections), facets: Some(facets), storage: Some(storages), runners: Some(runners), } }, }, } }
/* * Firecracker API * * RESTful public-facing API. The API is accessible through HTTP calls on specific URLs carrying JSON modeled data. The transport medium is a Unix Domain Socket. * * The version of the OpenAPI document: 0.25.0 * Contact: compute-capsule@amazon.com * Generated by: https://openapi-generator.tech */ /// Balloon : Balloon device descriptor. #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Balloon { /// Target balloon size in MiB. #[serde(rename = "amount_mib")] pub amount_mib: i32, /// Whether the balloon should deflate when the guest has memory pressure. #[serde(rename = "deflate_on_oom")] pub deflate_on_oom: bool, /// Interval in seconds between refreshing statistics. A non-zero value will enable the statistics. Defaults to 0. #[serde( rename = "stats_polling_interval_s", skip_serializing_if = "Option::is_none" )] pub stats_polling_interval_s: Option<i32>, } impl Balloon { /// Balloon device descriptor. pub fn new(amount_mib: i32, deflate_on_oom: bool) -> Balloon { Balloon { amount_mib, deflate_on_oom, stats_polling_interval_s: None, } } }
#![allow(dead_code)] use std::fmt::{Result, Display, Formatter}; use square88::*; use piece::*; use mask::Mask; use bit_board::BitBoard; pub struct Board88([Piece; 0x78]); impl Board88 { pub fn new() -> Self { Board88([VOID; 0x78]) } pub fn from(source: &BitBoard) -> Self { let mut result = Board88::new(); for file in ::file::ALL_FILES { for rank in ::rank::ALL_RANKS { let mask = Mask::from_file_rank(file, rank); let square = Square88::from(file, rank); result.set_piece(square, source.get_piece(mask)); } } result } pub fn to_bit_board(&self) -> BitBoard { let mut result = BitBoard::new(); for file in ::file::ALL_FILES { for rank in ::rank::ALL_RANKS { let mask = Mask::from_file_rank(file, rank); let square = Square88::from(file, rank); let p = self.get_piece(square); if p != VOID { result.set_piece(mask, p); } } } result } pub fn set_piece(&mut self, at: Square88, piece: Piece) { self.0[at.bits() as usize] = piece; } pub fn get_piece(&self, at: Square88) -> Piece { self.0[at.bits() as usize] } pub fn parse(input: &str) -> Self { Board88::from(&BitBoard::parse(input)) } pub fn squares(&self) -> SquareIter { SquareIter { board: self, current: ALL_SQUARES, } } pub fn is_attacked_by_jump(&self, square: Square88, piece: Piece, increments: &[i8]) -> bool { increments.iter() .map(|&i| { let target = square + i; target.is_valid() && self.get_piece(target) == piece }) .any(|x| x) } pub fn is_attacked_by_scan(&self, square: Square88, piece: Piece, increments: &[i8]) -> bool { increments.iter() .map(|&i| self.slide_for(square, piece, i)) .any(|x| x.is_valid()) } pub fn is_attacked_by_white(&self, square: Square88) -> bool { self.is_attacked_by_jump(square, WHITE_PAWN, &[15, 17]) | self.is_attacked_by_jump(square, WHITE_KNIGHT, &[-33, -31, -18, -14, 33, 31, 18, 14]) | self.is_attacked_by_jump(square, WHITE_KING, &[15, 17, -15, -17, 16, 1, -16, -1]) | self.is_attacked_by_scan(square, WHITE_BISHOP, &[15, 17, -15, -17]) | self.is_attacked_by_scan(square, WHITE_ROOK, &[16, 1, -16, -1]) | self.is_attacked_by_scan(square, WHITE_QUEEN, &[15, 17, -15, -17, 16, 1, -16, -1]) } pub fn is_attacked_by_black(&self, square: Square88) -> bool { self.is_attacked_by_jump(square, BLACK_PAWN, &[-15, -17]) | self.is_attacked_by_jump(square, BLACK_KNIGHT, &[-33, -31, -18, -14, 33, 31, 18, 14]) | self.is_attacked_by_jump(square, BLACK_KING, &[15, 17, -15, -17, 16, 1, -16, -1]) | self.is_attacked_by_scan(square, BLACK_BISHOP, &[15, 17, -15, -17]) | self.is_attacked_by_scan(square, BLACK_ROOK, &[16, 1, -16, -1]) | self.is_attacked_by_scan(square, BLACK_QUEEN, &[15, 17, -15, -17, 16, 1, -16, -1]) } /// slide from a `square` in direction of `increment` looking for a `piece`. /// return the index if found, invalid square otherwise pub fn slide_for(&self, square: Square88, piece: Piece, increment: i8) -> Square88 { let next = square + increment; if next.too_big() || !next.is_valid() { return UNDEFINED_SQUARE; } if self.get_piece(next) == piece { return next; } if self.get_piece(next) != VOID { return UNDEFINED_SQUARE; } self.slide_for(next, piece, increment) } pub fn find(&self, piece: Piece) -> Square88 { for s in ALL_SQUARES { if self.get_piece(s) == piece { return s; } } UNDEFINED_SQUARE } pub fn white_attacks(&self) -> Mask { ALL_SQUARES .filter(|s| self.is_attacked_by_white(*s)) .fold(::mask::masks::EMPTY, |acc, s| acc | s.into_mask()) } } impl Display for Board88 { fn fmt(&self, f: &mut Formatter) -> Result { write!(f, "{}", self.to_bit_board().print_fen()) } } pub struct SquareIter<'a> { board: &'a Board88, current: Square88, } impl<'a> Iterator for SquareIter<'a> { type Item = Piece; fn next(&mut self) -> Option<Self::Item> { self.current.next().map(|square| self.board.get_piece(square)) } } #[test] fn set_piece() { let mut b = Board88::new(); b.set_piece(E2, BLACK_ROOK); b.set_piece(E3, BLACK_ROOK); assert_eq!(format!("{}", b), "8/8/8/8/8/4r3/4r3/8"); } #[test] fn get_piece() { let b = Board88::parse("8/8/8/8/8/4r3/4r3/8"); assert_eq!(b.get_piece(E2), BLACK_ROOK); assert_eq!(b.get_piece(E3), BLACK_ROOK); } #[test] fn c6_is_attacked_by_black_pawn_on_b7() { assert_is_attacked_by_black("8/1p6/8/8/8/8/8/8 w", C6); } #[test] fn a6_is_attacked_by_black_pawn_on_b7() { assert_is_attacked_by_black("8/1p6/8/8/8/8/8/8 w", A6); } #[test] fn when_check_if_a8_is_attacked_it_does_not_overflow() { assert_is_not_attacked_by_black("8/8/8/8/8/8/8/8 w", A8); } #[test] fn h8_is_attacked_by_black_bishop_on_d4() { assert_is_attacked_by_black("8/8/8/8/3b4/8/8/8 w", H8); } #[test] fn h8_is_not_attacked_by_black_bishop_on_d4_because_its_masked_by_the_pawn_on_f6() { assert_is_not_attacked_by_black("8/8/5P2/8/3b4/8/8/8 w", H8); } #[test] fn a7_is_attacked_by_black_bishop_on_d4() { assert_is_attacked_by_black("8/8/8/8/3b4/8/8/8 w", A7); } #[test] fn a1_is_attacked_by_black_bishop_on_d4() { assert_is_attacked_by_black("8/8/8/8/3b4/8/8/8 w", A1); } #[test] fn f2_is_attacked_by_black_bishop_on_d4() { assert_is_attacked_by_black("8/8/8/8/3b4/8/8/8 w", F2); } #[test] fn c2_is_attacked_by_black_knight_on_d4() { assert_is_attacked_by_black("8/8/8/8/3n4/8/8/8 w", C2); } #[test] fn b3_is_attacked_by_black_knight_on_d4() { assert_is_attacked_by_black("8/8/8/8/3n4/8/8/8 w", B3); } #[test] fn b5_is_attacked_by_black_knight_on_d4() { assert_is_attacked_by_black("8/8/8/8/3n4/8/8/8 w", B5); } #[test] fn c6_is_attacked_by_black_knight_on_d4() { assert_is_attacked_by_black("8/8/8/8/3n4/8/8/8 w", C6); } #[test] fn e6_is_attacked_by_black_knight_on_d4() { assert_is_attacked_by_black("8/8/8/8/3n4/8/8/8 w", E6); } #[test] fn f5_is_attacked_by_black_knight_on_d4() { assert_is_attacked_by_black("8/8/8/8/3n4/8/8/8 w", F5); } #[test] fn f3_is_attacked_by_black_knight_on_d4() { assert_is_attacked_by_black("8/8/8/8/3n4/8/8/8 w", F3); } #[test] fn e2_is_attacked_by_black_knight_on_d4() { assert_is_attacked_by_black("8/8/8/8/3n4/8/8/8 w", E2); } #[test] fn d1_is_attacked_by_black_rook_on_d4() { assert_is_attacked_by_black("8/8/8/8/3r4/8/8/8 w", D1); } #[test] fn d6_is_attacked_by_black_rook_on_d4() { assert_is_attacked_by_black("8/8/8/8/3r4/8/8/8 w", D6); } #[test] fn f4_is_attacked_by_black_rook_on_d4() { assert_is_attacked_by_black("8/8/8/8/3r4/8/8/8 w", F4); } #[test] fn a4_is_attacked_by_black_rook_on_d4() { assert_is_attacked_by_black("8/8/8/8/3r4/8/8/8 w", A4); } #[test] fn c4_is_attacked_by_black_queen_on_d4() { assert_is_attacked_by_black("8/8/8/8/3q4/8/8/8 w", C4); } #[test] fn c3_is_attacked_by_black_queen_on_d4() { assert_is_attacked_by_black("8/8/8/8/3q4/8/8/8 w", C3); } #[test] fn d3_is_attacked_by_black_queen_on_d4() { assert_is_attacked_by_black("8/8/8/8/3q4/8/8/8 w", D3); } #[test] fn e3_is_attacked_by_black_queen_on_d4() { assert_is_attacked_by_black("8/8/8/8/3q4/8/8/8 w", E3); } #[test] fn e4_is_attacked_by_black_queen_on_d4() { assert_is_attacked_by_black("8/8/8/8/3q4/8/8/8 w", E4); } #[test] fn e5_is_attacked_by_black_queen_on_d4() { assert_is_attacked_by_black("8/8/8/8/3q4/8/8/8 w", E5); } #[test] fn d5_is_attacked_by_black_queen_on_d4() { assert_is_attacked_by_black("8/8/8/8/3q4/8/8/8 w", D5); } #[test] fn c5_is_attacked_by_black_queen_on_d4() { assert_is_attacked_by_black("8/8/8/8/3q4/8/8/8 w", C5); } #[test] fn c4_is_attacked_by_black_king_on_d4() { assert_is_attacked_by_black("8/8/8/8/3k4/8/8/8 w", C4); } #[test] fn c3_is_attacked_by_black_king_on_d4() { assert_is_attacked_by_black("8/8/8/8/3k4/8/8/8 w", C3); } #[test] fn d3_is_attacked_by_black_king_on_d4() { assert_is_attacked_by_black("8/8/8/8/3k4/8/8/8 w", D3); } #[test] fn e3_is_attacked_by_black_king_on_d4() { assert_is_attacked_by_black("8/8/8/8/3k4/8/8/8 w", E3); } #[test] fn e4_is_attacked_by_black_king_on_d4() { assert_is_attacked_by_black("8/8/8/8/3k4/8/8/8 w", E4); } #[test] fn e5_is_attacked_by_black_king_on_d4() { assert_is_attacked_by_black("8/8/8/8/3k4/8/8/8 w", E5); } #[test] fn d5_is_attacked_by_black_king_on_d4() { assert_is_attacked_by_black("8/8/8/8/3k4/8/8/8 w", D5); } #[test] fn c5_is_attacked_by_black_king_on_d4() { assert_is_attacked_by_black("8/8/8/8/3k4/8/8/8 w", C5); } #[test] fn c8_is_attacked_by_white_pawn_on_b7() { assert_is_attacked_by_white("8/1P6/8/8/8/8/8/8 w", C8); } #[test] fn a8_is_attacked_by_white_pawn_on_b7() { assert_is_attacked_by_white("8/1P6/8/8/8/8/8/8 w", A8); } fn assert_is_attacked_by_white(fen: &str, square: Square88) { assert_eq!(Board88::parse(fen).is_attacked_by_white(square), true); } fn assert_is_not_attacked_by_white(fen: &str, square: Square88) { assert_eq!(Board88::parse(fen).is_attacked_by_white(square), false); } fn assert_is_attacked_by_black(fen: &str, square: Square88) { assert_eq!(Board88::parse(fen).is_attacked_by_black(square), true); } fn assert_is_not_attacked_by_black(fen: &str, square: Square88) { assert_eq!(Board88::parse(fen).is_attacked_by_black(square), false); }
#![allow(non_snake_case)] use core::convert::TryInto; use test_winrt_signatures::*; use windows::core::*; use Component::Signatures::*; #[implement(Component::Signatures::ITestUInt8)] struct RustTest(); impl RustTest { fn SignatureUInt8(&self, a: u8, b: &mut u8) -> Result<u8> { *b = a; Ok(a) } fn ArraySignatureUInt8(&self, a: &[u8], b: &mut [u8], c: &mut Array<u8>) -> Result<Array<u8>> { assert!(a.len() == b.len()); assert!(c.is_empty()); b.copy_from_slice(a); *c = Array::from_slice(a); Ok(Array::from_slice(a)) } fn CallSignatureUInt8(&self, handler: &Option<SignatureUInt8>) -> Result<()> { let a = 123; let mut b = 0; // TODO: this seems rather verbose... let c = handler.as_ref().unwrap().Invoke(a, &mut b)?; assert!(a == b); assert!(a == c); Ok(()) } fn CallArraySignatureUInt8(&self, handler: &Option<ArraySignatureUInt8>) -> Result<()> { let a = [1, 2, 3]; let mut b = [0; 3]; let mut c = Array::new(); let d = handler.as_ref().unwrap().Invoke(&a, &mut b, &mut c)?; assert!(a == b); // TODO: should `a == c` be sufficient? Does that work for Vec? assert!(a == c[..]); assert!(a == d[..]); Ok(()) } } fn test_interface(test: &ITestUInt8) -> Result<()> { let a = 123; let mut b = 0; let c = test.SignatureUInt8(a, &mut b)?; assert!(a == b); assert!(a == c); test.CallSignatureUInt8(SignatureUInt8::new(|a, b| { *b = a; Ok(a) }))?; let a = [4, 5, 6]; let mut b = [0; 3]; let mut c = Array::new(); let d = test.ArraySignatureUInt8(&a, &mut b, &mut c)?; assert!(a == b); assert!(a == c[..]); assert!(a == d[..]); test.CallArraySignatureUInt8(ArraySignatureUInt8::new(|a, b, c| { assert!(a.len() == b.len()); assert!(c.is_empty()); b.copy_from_slice(a); *c = Array::from_slice(a); Ok(Array::from_slice(a)) }))?; Ok(()) } #[test] fn test() -> Result<()> { test_interface(&Test::new()?.try_into()?)?; test_interface(&RustTest().into())?; Ok(()) }
/// Structs for manipulating a Tuple Variation Header /// /// Tuple Variation Headers are used within a Tuple Variation Store to locate /// the deltas in the design space. These are low-level data structures, /// generally used only in serialization/deserialization. use bitflags::bitflags; use otspec::types::*; use otspec::{read_field, read_field_counted, stateful_deserializer}; use serde::de::{DeserializeSeed, SeqAccess, Visitor}; use serde::ser::SerializeSeq; use serde::{Deserialize, Serialize, Serializer}; bitflags! { /// Flags used internally to a tuple variation header #[derive(Serialize, Deserialize)] pub struct TupleIndexFlags: u16 { /// This header contains its own peak tuple (rather than a shared tuple) const EMBEDDED_PEAK_TUPLE = 0x8000; /// This header contains a start tuple and end tuple const INTERMEDIATE_REGION = 0x4000; /// This header has its own set of point numbers (rather than shared points) const PRIVATE_POINT_NUMBERS = 0x2000; /// Masks off flags to reveal the shared tuple index const TUPLE_INDEX_MASK = 0x0FFF; } } /// A tuple variation header /// /// Used to locate a set of deltas within the design space. #[derive(Debug, PartialEq)] pub struct TupleVariationHeader { /// Size in bytes of the serialized data (the data *after* the header/tuples // including the private points but *not* including the shared points) pub size: uint16, /// Flags (including the shared tuple index) pub flags: TupleIndexFlags, /// The index into the Tuple Variation Store's shared tuple array to be used /// if this header does not define its own peak tuple. pub sharedTupleIndex: uint16, /// The location at which this set of deltas has maximum effect. pub peakTuple: Option<Vec<f32>>, /// The start location for this delta region. pub startTuple: Option<Vec<f32>>, /// The end location for this delta region. pub endTuple: Option<Vec<f32>>, } stateful_deserializer!( TupleVariationHeader, TupleVariationHeaderDeserializer, { axis_count: uint16 }, fn visit_seq<A>(self, mut seq: A) -> std::result::Result<TupleVariationHeader, A::Error> where A: SeqAccess<'de>, { let mut res = TupleVariationHeader { size: 0, peakTuple: None, startTuple: None, endTuple: None, flags: TupleIndexFlags::empty(), sharedTupleIndex: 0, }; res.size = read_field!(seq, uint16, "a table size"); res.flags = read_field!(seq, TupleIndexFlags, "a tuple index"); res.sharedTupleIndex = res.flags.bits() & TupleIndexFlags::TUPLE_INDEX_MASK.bits(); if res.flags.contains(TupleIndexFlags::EMBEDDED_PEAK_TUPLE) { res.peakTuple = Some( (read_field_counted!(seq, self.axis_count, "a peak tuple") as Vec<i16>) .iter() .map(|x| F2DOT14::unpack(*x)) .collect(), ); } if res.flags.contains(TupleIndexFlags::INTERMEDIATE_REGION) { res.startTuple = Some( (read_field_counted!(seq, self.axis_count, "a start tuple") as Vec<i16>) .iter() .map(|x| F2DOT14::unpack(*x)) .collect(), ); res.endTuple = Some( (read_field_counted!(seq, self.axis_count, "an end tuple") as Vec<i16>) .iter() .map(|x| F2DOT14::unpack(*x)) .collect(), ); } Ok(res) } ); // In order to be stateless, this serializer relies on the `.size` and `.flags` // fields being set correctly upstream in the TVS serializer, so that it is // handed a struct "ready to go". impl Serialize for TupleVariationHeader { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer, { let mut seq = serializer.serialize_seq(None)?; seq.serialize_element::<uint16>(&self.size)?; seq.serialize_element::<uint16>(&(self.sharedTupleIndex | self.flags.bits()))?; if self.flags.contains(TupleIndexFlags::EMBEDDED_PEAK_TUPLE) { if self.peakTuple.is_some() { seq.serialize_element( &self .peakTuple .as_ref() .unwrap() .iter() .map(|x| otspec::ser::to_bytes(&F2DOT14::pack(*x)).unwrap()) .flatten() .collect::<Vec<u8>>(), )?; } else { panic!("EMBEDDED_PEAK_TUPLE was set, but there wasn't one."); } } if self.flags.contains(TupleIndexFlags::INTERMEDIATE_REGION) { if self.startTuple.is_some() { // This is messy. Ideally we should be able to serialize Tuple // directly, but it's a type alias. Maybe investigate another way // to call a serializer on it? seq.serialize_element( &self .startTuple .as_ref() .unwrap() .iter() .map(|x| otspec::ser::to_bytes(&F2DOT14::pack(*x)).unwrap()) .flatten() .collect::<Vec<u8>>(), )? } else { panic!("INTERMEDIATE_REGION was set, but there was no start tuple."); } if self.endTuple.is_some() { seq.serialize_element( &self .endTuple .as_ref() .unwrap() .iter() .map(|x| otspec::ser::to_bytes(&F2DOT14::pack(*x)).unwrap()) .flatten() .collect::<Vec<u8>>(), )? } else { panic!("INTERMEDIATE_REGION was set, but there was no end tuple."); } } seq.end() } } #[cfg(test)] mod tests { use crate::otvar::tuplevariationheader::TupleVariationHeaderDeserializer; use crate::otvar::{TupleIndexFlags, TupleVariationHeader}; use serde::de::DeserializeSeed; #[test] fn test_tvh_serde() { let tvh = TupleVariationHeader { size: 33, flags: TupleIndexFlags::EMBEDDED_PEAK_TUPLE, sharedTupleIndex: 0, peakTuple: Some(vec![0.5]), startTuple: None, endTuple: None, }; let serialized = otspec::ser::to_bytes(&tvh).unwrap(); let mut de = otspec::de::Deserializer::from_bytes(&serialized); let cs = TupleVariationHeaderDeserializer { axis_count: 1 }; let deserialized = cs.deserialize(&mut de).unwrap(); assert_eq!(deserialized, tvh); } #[test] fn test_tvh_deser() { let binary_tvh: Vec<u8> = vec![0, 33, 128, 0, 32, 0]; let mut de = otspec::de::Deserializer::from_bytes(&binary_tvh); let cs = TupleVariationHeaderDeserializer { axis_count: 1 }; let deserialized = cs.deserialize(&mut de).unwrap(); let serialized = otspec::ser::to_bytes(&deserialized).unwrap(); assert_eq!(serialized, binary_tvh); } }
#[doc = "Reader of register C6ESR"] pub type R = crate::R<u32, super::C6ESR>; #[doc = "Reader of field `TEA`"] pub type TEA_R = crate::R<u8, u8>; #[doc = "Reader of field `TED`"] pub type TED_R = crate::R<bool, bool>; #[doc = "Reader of field `TELD`"] pub type TELD_R = crate::R<bool, bool>; #[doc = "Reader of field `TEMD`"] pub type TEMD_R = crate::R<bool, bool>; #[doc = "Reader of field `ASE`"] pub type ASE_R = crate::R<bool, bool>; #[doc = "Reader of field `BSE`"] pub type BSE_R = crate::R<bool, bool>; impl R { #[doc = "Bits 0:6 - Transfer Error Address These bits are set and cleared by HW, in case of an MDMA data transfer error. It is used in conjunction with TED. This field indicates the 7 LSBits of the address which generated a transfer/access error. It may be used by SW to retrieve the failing address, by adding this value (truncated to the buffer transfer length size) to the current SAR/DAR value. Note: The SAR/DAR current value doesnt reflect this last address due to the FIFO management system. The SAR/DAR are only updated at the end of a (buffer) transfer (of TLEN+1 bytes). Note: It is not set in case of a link data error."] #[inline(always)] pub fn tea(&self) -> TEA_R { TEA_R::new((self.bits & 0x7f) as u8) } #[doc = "Bit 7 - Transfer Error Direction These bit is set and cleared by HW, in case of an MDMA data transfer error."] #[inline(always)] pub fn ted(&self) -> TED_R { TED_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Transfer Error Link Data These bit is set by HW, in case of a transfer error while reading the block link data structure. It is cleared by software writing 1 to the CTEIFx bit in the DMA_IFCRy register."] #[inline(always)] pub fn teld(&self) -> TELD_R { TELD_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Transfer Error Mask Data These bit is set by HW, in case of a transfer error while writing the Mask Data. It is cleared by software writing 1 to the CTEIFx bit in the DMA_IFCRy register."] #[inline(always)] pub fn temd(&self) -> TEMD_R { TEMD_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Address/Size Error These bit is set by HW, when the programmed address is not aligned with the data size. TED will indicate whether the problem is on the source or destination. It is cleared by software writing 1 to the CTEIFx bit in the DMA_IFCRy register."] #[inline(always)] pub fn ase(&self) -> ASE_R { ASE_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Block Size Error These bit is set by HW, when the block size is not an integer multiple of the data size either for source or destination. TED will indicate whether the problem is on the source or destination. It is cleared by software writing 1 to the CTEIFx bit in the DMA_IFCRy register."] #[inline(always)] pub fn bse(&self) -> BSE_R { BSE_R::new(((self.bits >> 11) & 0x01) != 0) } }
#![feature(custom_derive)] extern crate rustc_serialize; extern crate toml; use std::env; use std::fs::File; use std::io::Read; use std::str; use rustc_serialize::Decodable; #[derive(Debug,RustcDecodable)] struct Config { core: CoreConfig, } #[derive(Debug,RustcDecodable)] struct CoreConfig { port: u16, bind: String, } fn main() { let path = env::args().nth(1).unwrap(); let mut file = File::open(path).unwrap(); let mut buf = Vec::new(); let _ = file.read_to_end(&mut buf); let s = str::from_utf8(&buf[..]).unwrap(); println!("{}", s); let mut parser = toml::Parser::new(s); let toml = parser.parse(); if toml.is_none() { for err in parser.errors { println!("{}", err.desc); } } let toml = toml.unwrap(); println!("toml {:?}", toml); let mut decoder = toml::Decoder::new(toml::Value::Table(toml)); let config = Config::decode(&mut decoder); // let config = toml::Value::Table(toml); // let config = match toml::decode(config) { // Some(t) => t, // None => panic!("failed"), // }; println!("config {:?}", config.unwrap()); }
struct BinaryExpr { left: Expr, right: Expr }; enum Expr { } Binary (&'static str, binary!(^ pow ops::Pow), binary!(* mul ops::Mul), binary!(+ add ops::Add), binary!(- sub ops::Sub), fn parse(input: &str, level: usize) { let mut stack = Vec::new(); let mut iter = input.chars(); for i in input.chars()(' ') { match i { "+" => parse(left?, input } }
// Copyright 2019 MaidSafe.net limited. // // This SAFE Network Software is licensed to you under the MIT license <LICENSE-MIT // http://opensource.org/licenses/MIT> or the Modified BSD license <LICENSE-BSD // https://opensource.org/licenses/BSD-3-Clause>, at your option. This file may not be copied, // modified, or distributed except according to those terms. Please review the Licences for the // specific language governing permissions and limitations relating to use of the SAFE Network // Software. //! FFI macros. //! //! Because the `debug!` log output provides helpful information about FFI errors, these macros //! cannot be functions. Otherwise we lose some debug data like the line and column numbers and //! module name. /// Convert an error into a pair of `(error_code: i32, description: String)` to be used in /// `NativeResult`. /// /// The error must implement `Debug + Display`. #[macro_export] macro_rules! ffi_error { ($err:expr) => {{ let err_code = $crate::ffi_error_code!($err); let err_desc = $err.to_string(); (err_code, err_desc) }}; } /// Convert a result into a pair of `(error_code: i32, description: String)` to be used in /// `NativeResult`. /// /// The error must implement `Debug + Display`. #[macro_export] macro_rules! ffi_result { ($res:expr) => { match $res { Ok(_) => (0, String::default()), Err(error) => $crate::ffi_error!(error), } }; } /// Convert a result into an `i32` error code. /// /// The error must implement `Debug`. #[macro_export] macro_rules! ffi_result_code { ($res:expr) => { match $res { Ok(_) => 0, Err(error) => $crate::ffi_error_code!(error), } }; } /// Convert an error into an `i32` error code. /// /// The error must implement `Debug`. #[macro_export] macro_rules! ffi_error_code { ($err:expr) => {{ #[allow(unused, clippy::useless_attribute)] use $crate::ErrorCode; let err = &$err; let err_str = format!("{:?}", err); let err_code = err.error_code(); log::debug!("**ERRNO: {}** {}", err_code, err_str); err_code }}; } /// Convert a result into an `FfiResult` and call a callback. /// /// The error must implement `Debug + Display`. #[macro_export] macro_rules! call_result_cb { ($result:expr, $user_data:expr, $cb:expr) => { #[cfg_attr(feature = "cargo-clippy", allow(useless_attribute))] #[allow(unused)] use $crate::callback::{Callback, CallbackArgs}; use $crate::result::{FfiResult, NativeResult}; let (error_code, description) = $crate::ffi_result!($result); let res = NativeResult { error_code, description: Some(description), } .into_repr_c(); match res { Ok(res) => $cb.call($user_data.into(), &res, CallbackArgs::default()), Err(_) => { let res = FfiResult { error_code, description: b"Could not convert error description into CString\x00" as *const u8 as *const _, }; $cb.call($user_data.into(), &res, CallbackArgs::default()); } } }; } /// Given a result, calls the callback if it is an error, otherwise produces the wrapped value. /// Should be called within `catch_unwind`, so returns `None` on error. /// /// The error must implement `Debug + Display`. #[macro_export] macro_rules! try_cb { ($result:expr, $user_data:expr, $cb:expr) => { match $result { Ok(value) => value, e @ Err(_) => { $crate::call_result_cb!(e, $user_data, $cb); return None; } } }; } #[cfg(test)] mod tests { use crate::test_utils::TestError; #[test] fn error_code_and_desc() { { let err = TestError::Test; let (code, desc) = ffi_error!(err); assert_eq!(code, -1); assert_eq!(desc, "Test Error"); } { let err = TestError::from("howdy"); let (code, desc) = ffi_error!(err); assert_eq!(code, -2); assert_eq!(desc, "howdy".to_string()); } } }
//! Projection expression plan. use timely::dataflow::scopes::child::Iterative; use timely::dataflow::Scope; use timely::progress::Timestamp; use differential_dataflow::lattice::Lattice; use crate::binding::Binding; use crate::domain::Domain; use crate::plan::{Dependencies, Implementable}; use crate::timestamp::Rewind; use crate::Var; use crate::{CollectionRelation, Implemented, Relation, ShutdownHandle, VariableMap}; /// A plan stage projecting its source to only the specified sequence /// of variables. Throws on unbound variables. Frontends are responsible /// for ensuring that the source binds all requested variables. #[derive(Hash, PartialEq, Eq, PartialOrd, Ord, Clone, Debug, Serialize, Deserialize)] pub struct Project<P: Implementable> { /// TODO pub variables: Vec<Var>, /// Plan for the data source. pub plan: Box<P>, } impl<P: Implementable> Implementable for Project<P> { type A = P::A; fn dependencies(&self) -> Dependencies<Self::A> { self.plan.dependencies() } fn into_bindings(&self) -> Vec<Binding<Self::A>> { self.plan.into_bindings() } fn implement<'b, S>( &self, nested: &mut Iterative<'b, S, u64>, domain: &mut Domain<Self::A, S::Timestamp>, local_arrangements: &VariableMap<Self::A, Iterative<'b, S, u64>>, ) -> (Implemented<'b, Self::A, S>, ShutdownHandle) where S: Scope, S::Timestamp: Timestamp + Lattice + Rewind, { let (relation, mut shutdown_handle) = self.plan.implement(nested, domain, local_arrangements); let tuples = { let (projected, shutdown) = relation.projected(nested, domain, &self.variables); shutdown_handle.merge_with(shutdown); projected }; let projected = CollectionRelation { variables: self.variables.to_vec(), tuples, }; (Implemented::Collection(projected), shutdown_handle) } }
// Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org> // SPDX-License-Identifier: MIT use std::process; use crate::{Choice, Error, Input, Message, Password, Question, Result}; /// The `zenity` backend. /// /// This backend uses the external `zenity` program to display GTK+ dialog boxes. #[derive(Debug)] pub struct Zenity { icon: Option<String>, width: Option<String>, height: Option<String>, timeout: Option<String>, } impl Zenity { /// Creates a new `Zenity` instance without configuration. pub fn new() -> Zenity { Zenity { icon: None, width: None, height: None, timeout: None, } } /// Sets the icon of the dialog box. /// /// The icon can either be one of `error`, `info`, `question` or `warning, or the path to an /// image to use. The default image depends on the dialog type. pub fn set_icon(&mut self, icon: impl Into<String>) { self.icon = Some(icon.into()); } /// Sets the height of the dialog boxes. /// /// The height is given in pixels. The actual height of the dialog box might be higher than /// the given height if the content would not fit otherwise. pub fn set_height(&mut self, height: u32) { self.height = Some(height.to_string()); } /// Sets the width of the dialog boxes. /// /// The width is given in pixels. The actual width of the dialog box might be higher than the /// given width if the content would not fit otherwise. pub fn set_width(&mut self, width: u32) { self.width = Some(width.to_string()); } /// Sets the timout of the dialog boxes (in seconds). /// /// After the timeout, the dialog box is closed. The timeout is handled like a cancel event. /// Per default, there is no timeout. pub fn set_timeout(&mut self, timeout: u32) { self.timeout = Some(timeout.to_string()); } pub(crate) fn is_available() -> bool { super::is_available("zenity") } fn execute(&self, args: Vec<&str>, title: &Option<String>) -> Result<process::Output> { let mut command = process::Command::new("zenity"); if let Some(ref icon) = self.icon { command.arg("--window-icon"); command.arg(icon); } if let Some(ref width) = self.width { command.arg("--width"); command.arg(width); } if let Some(ref height) = self.height { command.arg("--height"); command.arg(height); } if let Some(ref timeout) = self.timeout { command.arg("--timeout"); command.arg(timeout); } if let Some(ref title) = title { command.arg("--title"); command.arg(title); } command.args(args); command.output().map_err(Error::IoError) } } impl AsRef<Zenity> for Zenity { fn as_ref(&self) -> &Self { self } } fn require_success(status: process::ExitStatus) -> Result<()> { if status.success() { Ok(()) } else if let Some(code) = status.code() { match code { 5 => Ok(()), _ => Err(Error::from(("zenity", status))), } } else { Err(Error::from(("zenity", status))) } } fn get_choice(status: process::ExitStatus) -> Result<Choice> { if let Some(code) = status.code() { match code { 0 => Ok(Choice::Yes), 1 => Ok(Choice::No), 5 => Ok(Choice::Cancel), _ => Err(Error::from(("zenity", status))), } } else { Err(Error::from(("zenity", status))) } } fn get_stdout(output: process::Output) -> Result<Option<String>> { if output.status.success() { String::from_utf8(output.stdout) .map(|s| Some(s.trim_end_matches('\n').to_string())) .map_err(Error::from) } else if let Some(code) = output.status.code() { match code { 0 => Ok(None), 1 => Ok(None), 5 => Ok(None), _ => Err(Error::from(("zenity", output.status))), } } else { Err(Error::from(("zenity", output.status))) } } impl super::Backend for Zenity { fn show_input(&self, input: &Input) -> Result<Option<String>> { let mut args = vec!["--entry", "--text", &input.text]; if let Some(ref default) = input.default { args.push("--entry-text"); args.push(default); } self.execute(args, &input.title).and_then(get_stdout) } fn show_message(&self, message: &Message) -> Result<()> { let args = vec!["--info", "--text", &message.text]; self.execute(args, &message.title) .and_then(|output| require_success(output.status)) .map(|_| ()) } fn show_password(&self, password: &Password) -> Result<Option<String>> { let args = vec!["--password"]; self.execute(args, &password.title).and_then(get_stdout) } fn show_question(&self, question: &Question) -> Result<Choice> { let args = vec!["--question", "--text", &question.text]; self.execute(args, &question.title) .and_then(|output| get_choice(output.status)) } }
/// A file serialization format. /// /// Is implemented by `GraphSyntax` for graph files and `DatasetSyntax` for dataset files. pub trait FileSyntax: Sized { /// Its canonical IRI. fn iri(self) -> &'static str; /// Its [IANA media type](https://tools.ietf.org/html/rfc2046). fn media_type(self) -> &'static str; /// Its [IANA-registered](https://tools.ietf.org/html/rfc2046) file extension. fn file_extension(self) -> &'static str; /// Looks for a known syntax from a media type. /// /// Example: /// ``` /// use rudf::{GraphSyntax, FileSyntax}; /// assert_eq!(GraphSyntax::from_mime_type("text/turtle; charset=utf-8"), Some(GraphSyntax::Turtle)) /// ``` fn from_mime_type(media_type: &str) -> Option<Self>; } /// [RDF graph](https://www.w3.org/TR/rdf11-concepts/#dfn-graph) serialization formats. #[derive(Eq, PartialEq, Debug, Clone, Copy, Hash)] pub enum GraphSyntax { /// [N-Triples](https://www.w3.org/TR/n-triples/) NTriples, /// [Turtle](https://www.w3.org/TR/turtle/) Turtle, /// [RDF XML](https://www.w3.org/TR/rdf-syntax-grammar/) RdfXml, } impl FileSyntax for GraphSyntax { fn iri(self) -> &'static str { match self { GraphSyntax::NTriples => "http://www.w3.org/ns/formats/N-Triples", GraphSyntax::Turtle => "http://www.w3.org/ns/formats/Turtle", GraphSyntax::RdfXml => "http://www.w3.org/ns/formats/RDF_XML", } } fn media_type(self) -> &'static str { match self { GraphSyntax::NTriples => "application/n-triples", GraphSyntax::Turtle => "text/turtle", GraphSyntax::RdfXml => "application/rdf+xml", } } fn file_extension(self) -> &'static str { match self { GraphSyntax::NTriples => "nt", GraphSyntax::Turtle => "ttl", GraphSyntax::RdfXml => "rdf", } } fn from_mime_type(media_type: &str) -> Option<Self> { if let Some(base_type) = media_type.split(';').next() { match base_type { "application/n-triples" => Some(GraphSyntax::NTriples), "text/turtle" => Some(GraphSyntax::Turtle), "application/rdf+xml" => Some(GraphSyntax::RdfXml), _ => None, } } else { None } } } /// [RDF dataset](https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-dataset) serialization formats. #[derive(Eq, PartialEq, Debug, Clone, Copy, Hash)] pub enum DatasetSyntax { /// [N-Quads](https://www.w3.org/TR/n-quads/) NQuads, /// [TriG](https://www.w3.org/TR/trig/) TriG, } impl FileSyntax for DatasetSyntax { fn iri(self) -> &'static str { match self { DatasetSyntax::NQuads => "http://www.w3.org/ns/formats/N-Quads", DatasetSyntax::TriG => "http://www.w3.org/ns/formats/TriG", } } fn media_type(self) -> &'static str { match self { DatasetSyntax::NQuads => "application/n-quads", DatasetSyntax::TriG => "application/trig", } } fn file_extension(self) -> &'static str { match self { DatasetSyntax::NQuads => "nq", DatasetSyntax::TriG => "trig", } } fn from_mime_type(media_type: &str) -> Option<Self> { if let Some(base_type) = media_type.split(';').next() { match base_type { "application/n-quads" => Some(DatasetSyntax::NQuads), "application/trig" => Some(DatasetSyntax::TriG), _ => None, } } else { None } } }
// // traits.rs // Copyright (C) 2019 Malcolm Ramsay <malramsay64@gmail.com> // Distributed under terms of the MIT license. // use std::{fmt, ops, slice}; use anyhow::Error; use nalgebra::SVector; use serde::Serialize; use svg::node::element::Group; use svg::Document; use crate::{Basis, Transform2}; pub trait Transformer { fn as_simple(&self) -> String; } pub trait Periodic<Rhs = Self> { type Output; fn periodic(&self, rhs: Rhs) -> Self::Output; } pub trait PeriodicAssign<Rhs = Self> { fn periodic_assign(&mut self, rhs: Rhs); } pub trait AdjustPeriod<const D: usize> { type Output; fn adjust_period(&self, adjustment: SVector<f64, D>) -> Self::Output; } pub trait Intersect { fn intersects(&self, other: &Self) -> bool; fn area(&self) -> f64; } pub trait Potential { fn energy(&self, other: &Self) -> f64; } pub trait Shape: Clone + Send + Sync + Serialize + fmt::Debug + fmt::Display + ToSVG<Value = Group> { type Component: Clone + Send + Sync + Serialize + fmt::Debug + fmt::Display + ops::Mul<Transform2, Output = Self::Component> + ToSVG; fn score(&self, other: &Self) -> Option<f64>; fn enclosing_radius(&self) -> f64; fn get_items(&self) -> Vec<Self::Component>; fn rotational_symmetries(&self) -> u64 { 1 } fn iter(&self) -> slice::Iter<'_, Self::Component>; fn transform(&self, transform: &Transform2) -> Self; } pub trait FromSymmetry: Sized { fn from_operations(ops: &str) -> Result<Self, Error>; } pub trait State: Eq + PartialEq + PartialOrd + Ord + Clone + Send + Sync + Serialize + fmt::Debug + ToSVG<Value = Document> { fn score(&self) -> Option<f64>; fn generate_basis(&self) -> Vec<Basis>; fn total_shapes(&self) -> usize; fn as_positions(&self) -> Result<String, Error>; } pub trait ToSVG { type Value: svg::Node; fn as_svg(&self) -> Self::Value; }
use projecteuler::primes; fn main() { println!("{:?}", primes::factorize(600_851_475_143)); }
use std::collections::HashSet; use normalize::normalize; fn shingles(s: &str) -> HashSet<String> { let chars: Vec<_> = s.chars().collect(); chars.windows(2).map(|w| w.iter().cloned().collect()).collect() } // Intersection of the sets divided by the size of the union of the // sets. fn jaccard_distance(s1: &str, s2: &str) -> f64 { let s1_shingles = shingles(s1); let s2_shingles = shingles(s2); let inter = s1_shingles.intersection(&s2_shingles).count(); let union = s1_shingles.union(&s2_shingles).count(); (inter as f64) / (union as f64) } fn numeric_match(s1: &str, s2: &str) -> bool { s1.chars().filter(|l| l.is_numeric()).eq(s2.chars().filter(|l| l.is_numeric())) } pub fn compare_normals(s1: &str, s2: &str) -> f64 { if numeric_match(s1, s2) { jaccard_distance(s1, s2) } else { 0.0 } } pub fn compare(s1: &str, s2: &str) -> f64 { let normal_s1 = normalize(s1); let normal_s2 = normalize(s2); compare_normals(&normal_s1, &normal_s2) } // fn comp_and_print(s1: &str, s2: &str) { // println!("'{}' vs '{}' ... \t {}", s1, s2, compare(s1, s2)); // } #[cfg(test)] mod tests { use super::compare; use super::numeric_match; use test::Bencher; #[test] fn it_works() { assert_eq!(compare("Pear", "Peach"), 0.4); } #[test] fn compares_numbers() { assert_eq!(numeric_match("Pear 123", "Peach 123"), true); assert_eq!(numeric_match("Pear 121", "Peach 123"), false); assert_eq!(numeric_match("1800 Tequilla", "1800 Tequilla"), true); assert_eq!(numeric_match("Import Z1", "Import Z2"), false); } #[bench] fn bench_compare_one_word(b: &mut Bencher) { b.iter(|| compare("Pear", "Peach")); } #[bench] fn bench_compare_longer(b: &mut Bencher) { b.iter(|| compare("Apple pie", "Grandma's Apple pie")); } #[bench] fn bench_compare_longest(b: &mut Bencher) { b.iter(|| compare("American Wine Dist.- We Miolo", "American Wine Distributors")); } }
use super::Constant; pub fn ne(args: Vec<Constant>) -> Constant { super::not::not(vec![super::eq::eq(args)]) }
use crate::context::*; use crate::text_edit::apply_text_edits_to_buffer; use crate::types::*; use lsp_types::request::*; use lsp_types::*; use serde::Deserialize; use url::Url; pub fn text_document_range_formatting( meta: EditorMeta, params: EditorParams, ranges: Vec<Range>, ctx: &mut Context, ) { let params = FormattingOptions::deserialize(params) .expect("Params should follow FormattingOptions structure"); let req_params = ranges .into_iter() .map(|range| DocumentRangeFormattingParams { text_document: TextDocumentIdentifier { uri: Url::from_file_path(&meta.buffile).unwrap(), }, range, options: params.clone(), work_done_progress_params: Default::default(), }) .collect(); ctx.batch_call::<RangeFormatting, _>( meta, req_params, move |ctx: &mut Context, meta: EditorMeta, results: Vec<Option<Vec<TextEdit>>>| { let text_edits = results .into_iter() .flatten() .flatten() .map(OneOf::Left) .collect::<Vec<_>>(); editor_range_formatting(meta, &text_edits, ctx) }, ); } pub fn editor_range_formatting( meta: EditorMeta, text_edits: &[OneOf<TextEdit, AnnotatedTextEdit>], ctx: &mut Context, ) { let cmd = ctx.documents.get(&meta.buffile).and_then(|document| { apply_text_edits_to_buffer(None, text_edits, &document.text, ctx.offset_encoding) }); match cmd { Some(cmd) => ctx.exec(meta, cmd), // Nothing to do, but sending command back to the editor is required to handle case when // editor is blocked waiting for response via fifo. None => ctx.exec(meta, "nop"), } }
//! Compiles the network to bytecode. use crate::bytecode::*; use crate::network::{Network, Node, NodeKind}; use crate::value::{Value, ValueKind}; use std::collections::HashMap; trait ToByteCode { fn to_bytecode(&self, bytecode: &mut Vec<u8>); } // impl ToByteCode for Value { // fn to_bytecode(&self, bytecode: &mut Vec<u8>) { // match self { // Value::Int(v) => { // let v: [u8; 4] = unsafe { std::mem::transmute(*v) }; // bytecode.push(OP_CONST_I32); // bytecode.extend(v.iter()); // } // } // } // } impl ToByteCode for i32 { fn to_bytecode(&self, bytecode: &mut Vec<u8>) { let v: [u8; 4] = unsafe { std::mem::transmute(*self) }; // bytecode.push(OP_CONST_I32); bytecode.extend(v.iter()); } } impl ToByteCode for f32 { fn to_bytecode(&self, bytecode: &mut Vec<u8>) { let v: [u8; 4] = unsafe { std::mem::transmute(*self) }; // bytecode.push(OP_CONST_F32); bytecode.extend(v.iter()); } } // impl ToByteCode for Spread { // fn to_bytecode(&self, bytecode: &mut Vec<u8>) { // match self { // Spread::Int(vals) => { // if vals.len() == 1 { // bytecode.push(OP_CONST_I32); // vals[0].to_bytecode(bytecode); // } else { // //bytecode.push(OP_SPREAD_I32); // //bytecode.push(1); // } // } // Spread::Float(vals) => { // if vals.len() == 1 { // bytecode.push(OP_CONST_F32); // vals[0].to_bytecode(bytecode); // } else { // //bytecode.push(OP_SPREAD_I32); // //bytecode.push(1); // } // } // Spread::String(vals) => {} // } // } // } impl ToByteCode for NodeKind { fn to_bytecode(&self, bytecode: &mut Vec<u8>) { let op = (*self).into(); bytecode.push(op); } } pub fn print_constant_pool(constant_pool: &Vec<Value>) { for i in 0..constant_pool.len() { let value = &constant_pool[i]; println!("{:2}: {:?}", i, value); } } pub fn print_bytecode(bytecode: &Vec<u8>) { let mut index: usize = 0; loop { print!("{:4} ", index); let op = bytecode[index]; index += 1; match op { OP_CONST_I32 => { let x1 = bytecode[index + 0]; let x2 = bytecode[index + 1]; let x3 = bytecode[index + 2]; let x4 = bytecode[index + 3]; index += 4; println!("OP_CONST_I32 {} {} {} {}", x1, x2, x3, x4); } OP_DUP => { println!("OP_DUP"); } OP_POP => { println!("OP_POP"); } OP_JMP => { let addr0 = bytecode[index + 0]; let addr1 = bytecode[index + 1]; index += 2; println!("OP_JMP {} {}", addr0, addr1); } OP_IF_EQ_I32 => { let addr0 = bytecode[index + 0]; let addr1 = bytecode[index + 1]; index += 2; println!("OP_IF_EQ_I32 {} {}", addr0, addr1); } OP_CALL_NODE => { let kind = bytecode[index]; index += 1; let kind = match kind { 1 => NodeKind::Int, 2 => NodeKind::Add, 3 => NodeKind::Negate, 4 => NodeKind::Switch, 5 => NodeKind::Frame, x => panic!("Error unknown kind {}", x), }; println!("OP_CALL {:?}", kind); } // OP_VALUE_NEW => { // let kind = bytecode[index]; // index += 1; // let kind = ValueKind::from(kind); // println!("OP_SPREAD_NEW {:?}", kind); // } // OP_SPREAD_STORE => { // println!("OP_SPREAD_STORE"); // } OP_VALUE_LOAD => { println!("OP_VALUE_LOAD"); } OP_END => { println!("OP_END"); break; } x => { println!("ERROR UNKNOWN BYTECODE {}", x); break; } } } } #[derive(Debug, PartialEq, Eq)] pub enum CompileErrorKind {} #[derive(Debug, PartialEq, Eq)] pub struct CompileError { location: (usize, usize), kind: CompileErrorKind, } pub struct CompilerContext<'a> { pub network: &'a Network, } trait Visitor { fn visit(&mut self, node: &Node, context: &mut CompilerContext) -> Result<(), CompileError>; fn visit_inputs( &mut self, node: &Node, context: &mut CompilerContext, ) -> Result<(), CompileError> { for input_node in &context.network.input_nodes(node) { self.visit(input_node, context)?; } Ok(()) } } pub struct CompiledNetwork { pub bytecode: Vec<u8>, pub constant_pool: Vec<Value>, } impl CompiledNetwork { pub fn new() -> CompiledNetwork { CompiledNetwork { bytecode: Vec::new(), constant_pool: Vec::new(), } } } struct LogNodeNamesVisitor; impl Visitor for LogNodeNamesVisitor { fn visit(&mut self, node: &Node, context: &mut CompilerContext) -> Result<(), CompileError> { println!("Visiting: {}", node.name); self.visit_inputs(node, context) } } struct CodeGenVisitor { pub bytecode: Vec<u8>, pub labels: HashMap<String, usize>, pub constant_pool: Vec<Value>, } impl CodeGenVisitor { pub fn new() -> CodeGenVisitor { CodeGenVisitor { bytecode: Vec::new(), labels: HashMap::new(), constant_pool: Vec::new(), } } pub fn mark_label(&mut self, label: String) { self.labels.insert(label, self.bytecode.len()); } pub fn find_label(&self, label: &str) -> Option<usize> { self.labels.get(label).map(|pos| *pos) } // We don't use usize since the constant pool can only take the size that we specify, which is bounded. pub fn intern_string(&mut self, s: &str) -> i32 { // Check if string is in the pool let pos = self.constant_pool.iter().position(|v| { if let Value::String(vs) = v { vs == s } else { false } }); // If it is, return its position. if let Some(pos) = pos { return pos as i32; } // If not, place a copy in the constant pool. self.constant_pool.push(Value::String(s.to_string())); (self.constant_pool.len() - 1) as i32 } pub fn push_const_i32(&mut self, v: i32) { self.bytecode.push(OP_CONST_I32); v.to_bytecode(&mut self.bytecode); } pub fn push_const_f32(&mut self, v: f32) { self.bytecode.push(OP_CONST_F32); v.to_bytecode(&mut self.bytecode); } pub fn push_dup(&mut self) { self.bytecode.push(OP_DUP); } pub fn push_pop(&mut self) { self.bytecode.push(OP_POP); } pub fn push_address(&mut self, addr: u16) { self.bytecode.push(((addr >> 8) & 0xff) as u8); self.bytecode.push((addr & 0xff) as u8); } pub fn push_jmp(&mut self, addr: u16) { self.bytecode.push(OP_JMP); self.push_address(addr); } pub fn push_if_eq_i32(&mut self, addr: u16) { self.bytecode.push(OP_IF_EQ_I32); self.push_address(addr); } /// Stack before: /// - count /// Stack after: /// - spread ref // pub fn push_spread_new(&mut self, size: usize, kind: SpreadKind) { // // Push spread size // self.bytecode.push(OP_CONST_I32); // (size as i32).to_bytecode(&mut self.bytecode); // // Push spread creation + type // self.bytecode.push(OP_SPREAD_NEW); // self.bytecode.push(SpreadKind::Int.into()); // } // /// This instruction assumes the spread ref is already on the stack. // pub fn push_spread_store_i32(&mut self, index: usize, v: i32) { // self.push_const_i32(index as i32); // self.push_const_i32(v); // self.bytecode.push(OP_SPREAD_STORE); // } fn visit_value(&mut self, value: &Value, _context: &mut CompilerContext) { match value { Value::Int(v) => self.push_const_i32(*v), Value::Float(v) => self.push_const_f32(*v), _ => { self.constant_pool.push(value.clone()); let index = (self.constant_pool.len() - 1) as i32; self.push_const_i32(index); self.bytecode.push(OP_VALUE_LOAD); } } } fn visit_input_port( &mut self, node: &Node, input_port: &str, context: &mut CompilerContext, ) -> Result<(), CompileError> { match context.network.find_output_node(node, &input_port) { Some(output_node) => { self.visit(output_node, context)?; } None => { let value = node.values.get(input_port).unwrap(); self.visit_value(value, context); } } Ok(()) } } impl Visitor for CodeGenVisitor { fn visit(&mut self, node: &Node, context: &mut CompilerContext) -> Result<(), CompileError> { let label = self.mark_label(node.name.clone()); match node.kind { NodeKind::Switch => { let mut node_fixups = HashMap::new(); let mut jmp_fixups = Vec::new(); let index_port = &node.kind.inputs()[0]; self.visit_input_port(node, &index_port, context)?; // Now we have the index value of the input to select on the stack. let mut port_index = 0; for input_port in node.kind.inputs().iter().skip(1) { if let Some(output_node) = context.network.find_output_node(node, &input_port) { // FIXME: better error checking. What happens if we can't find the label here? Is this a compilation error? // let label = self.find_label(&output_node.name).unwrap(); // let label: u16 = label as u16; // let label: [u8; 2] = unsafe { std::mem::transmute(label) }; // Duplicate the index value. self.push_dup(); self.push_const_i32(port_index); self.push_if_eq_i32(0xcccc); node_fixups.insert(output_node.name.clone(), self.bytecode.len() - 2); } port_index += 1; } // Discard (pop) the index value from the stack. self.push_pop(); // Jump to the end of the node. self.push_jmp(0xcccc); jmp_fixups.push(self.bytecode.len() - 2); // First visit all available switch inputs. // FIXME: If the value for switch is constant, we only need to generate the bytecode for the port that is selected. let other_inputs = node.kind.inputs(); for input_port in other_inputs.iter().skip(1) { println!("Visiting {}", input_port); // Visiting the input port also has the side effect that we write out the label (bytecode position) for that node. // We need this position to jump to it from the switch node. self.visit_input_port(node, input_port, context)?; self.push_jmp(0xcccc); jmp_fixups.push(self.bytecode.len() - 2); } let end_addr = self.bytecode.len(); let end_addr = end_addr as u16; //let end_addr: [u8; 2] = unsafe { std::mem::transmute(end_addr) }; for fixup in &jmp_fixups { self.bytecode[*fixup] = ((end_addr >> 8) & 0xff) as u8; self.bytecode[*fixup + 1] = (end_addr & 0xff) as u8; } for (node_name, addr) in &node_fixups { let node_addr = self.labels[node_name]; let node_addr = node_addr as u16; self.bytecode[*addr] = ((node_addr >> 8) & 0xff) as u8; self.bytecode[*addr + 1] = (node_addr & 0xff) as u8; } // print_bytecode(&self.bytecode); // println!("LABELS: {:?}", self.labels); // println!("FIXUPS: {:?}", node_fixups); // println!("JMP FIXUPS: {:?}", jmp_fixups); // Afterwards the value of the input_port is still on the stack. //self.bytecode.push() // Evaluate the first op // Compare the output to see the result // Switch based on the label } _ => { // Prepare arguments let input_ports = node.kind.inputs(); for input_port in input_ports { self.visit_input_port(node, &input_port, context)?; } self.bytecode.push(OP_CALL_NODE); node.kind.to_bytecode(&mut self.bytecode); } } Ok(()) } } pub fn compile_network(network: &Network) -> Result<CompiledNetwork, CompileError> { let mut context = CompilerContext { network }; let rendered_node = network.rendered_node(); if rendered_node.is_none() { let mut result = CompiledNetwork::new(); result.bytecode.push(OP_END); return Ok(result); } let rendered_node = rendered_node.unwrap(); // let mut log_node_names_visitor = LogNodeNamesVisitor {}; // log_node_names_visitor.visit(rendered_node, &mut context)?; let mut code_gen_visitor = CodeGenVisitor::new(); code_gen_visitor.visit(rendered_node, &mut context)?; code_gen_visitor.bytecode.push(OP_END); let mut compiled_network = CompiledNetwork::new(); compiled_network.bytecode.extend(code_gen_visitor.bytecode); compiled_network.constant_pool = code_gen_visitor.constant_pool; Ok(compiled_network) }
use rustc_serialize::json; use std::collections::HashMap; use std::env; use std::fs::File; use std::io::{Read, Write}; use std::path::PathBuf; pub fn load() -> HashMap<String, String> { let mut data = String::new(); match File::open(&data_file_path()) { Ok(mut file) => { file.read_to_string(&mut data).unwrap(); }, _ => { data.push_str("{}"); } }; json::decode(&data[..]).unwrap() } pub fn save(rump_data: HashMap<String, String>) { let data = json::encode(&rump_data).unwrap(); let mut file = File::create(&data_file_path()).unwrap(); write!(&mut file, "{}", data).unwrap(); } fn data_file_path() -> PathBuf { let mut home = env::home_dir().unwrap(); home.push(".rump"); home }
/// Generates an `apply` function that is called when the smart contract is invoked. #[macro_export] macro_rules! abi { ($($t:ty),*) => { #[no_mangle] pub extern "C" fn apply(receiver: u64, code: u64, action: u64) { std::panic::set_hook(Box::new(|panic_info| { let payload = panic_info.payload(); let message = payload .downcast_ref::<&str>() .map(|s| s.to_string()) .or_else(|| payload.downcast_ref::<String>().map(|s| s.to_string())) .unwrap_or_else(|| panic_info.to_string()); $crate::check(false, &message); })); if code == eosio::n!("eosio") && action == eosio::n!("onerror") { panic!( "onerror action's are only valid from the \"eosio\" system account" ) } $( else if code == receiver && action == <$t as eosio::ActionFn>::NAME.as_u64() { let data = $crate::read_action_data::<$t>().expect("failed to read action data"); <$t as eosio::ActionFn>::call(data) } )+ else { panic!("unknown action '{}'", eosio::Name::new(action)); } } }; }
#[cfg(feature = "flame-it")] use std::ffi::OsString; /// Struct containing all kind of settings for the python vm. #[non_exhaustive] pub struct Settings { /// -d command line switch pub debug: bool, /// -i pub inspect: bool, /// -i, with no script pub interactive: bool, /// -O optimization switch counter pub optimize: u8, /// Not set SIGINT handler(i.e. for embedded mode) pub no_sig_int: bool, /// -s pub no_user_site: bool, /// -S pub no_site: bool, /// -E pub ignore_environment: bool, /// verbosity level (-v switch) pub verbose: u8, /// -q pub quiet: bool, /// -B pub dont_write_bytecode: bool, /// -P pub safe_path: bool, /// -b pub bytes_warning: u64, /// -Xfoo[=bar] pub xopts: Vec<(String, Option<String>)>, /// -X int_max_str_digits pub int_max_str_digits: i64, /// -I pub isolated: bool, /// -Xdev pub dev_mode: bool, /// -X warn_default_encoding, PYTHONWARNDEFAULTENCODING pub warn_default_encoding: bool, /// -Wfoo pub warnopts: Vec<String>, /// Environment PYTHONPATH and RUSTPYTHONPATH: pub path_list: Vec<String>, /// sys.argv pub argv: Vec<String>, /// PYTHONHASHSEED=x pub hash_seed: Option<u32>, /// -u, PYTHONUNBUFFERED=x // TODO: use this; can TextIOWrapper even work with a non-buffered? pub stdio_unbuffered: bool, /// --check-hash-based-pycs pub check_hash_based_pycs: String, /// false for wasm. Not a command-line option pub allow_external_library: bool, pub utf8_mode: u8, #[cfg(feature = "flame-it")] pub profile_output: Option<OsString>, #[cfg(feature = "flame-it")] pub profile_format: Option<String>, } impl Settings { pub fn with_path(mut self, path: String) -> Self { self.path_list.push(path); self } } /// Sensible default settings. impl Default for Settings { fn default() -> Self { Settings { debug: false, inspect: false, interactive: false, optimize: 0, no_sig_int: false, no_user_site: false, no_site: false, ignore_environment: false, verbose: 0, quiet: false, dont_write_bytecode: false, safe_path: false, bytes_warning: 0, xopts: vec![], isolated: false, dev_mode: false, warn_default_encoding: false, warnopts: vec![], path_list: vec![], argv: vec![], hash_seed: None, stdio_unbuffered: false, check_hash_based_pycs: "default".to_owned(), allow_external_library: cfg!(feature = "importlib"), utf8_mode: 1, int_max_str_digits: -1, #[cfg(feature = "flame-it")] profile_output: None, #[cfg(feature = "flame-it")] profile_format: None, } } }
#[macro_use] extern crate glium; mod teapot; fn main() { use glium::{glutin, Surface}; let mut events_loop = glutin::EventsLoop::new(); let dimensions = glutin::dpi::LogicalSize::new(800.0, 800.0); let window = glutin::WindowBuilder::new().with_dimensions(dimensions); let context = glutin::ContextBuilder::new().with_depth_buffer(24); let display = glium::Display::new(window, context, &events_loop).unwrap(); //let vertex_buffer = glium::VertexBuffer::new(&display, &shape).unwrap(); //let indices = glium::index::NoIndices(glium::index::PrimitiveType::TrianglesList); let positions = glium::VertexBuffer::new(&display, &teapot::VERTICES).unwrap(); let normals = glium::VertexBuffer::new(&display, &teapot::NORMALS).unwrap(); let indices = glium::IndexBuffer::new(&display, glium::index::PrimitiveType::TrianglesList, &teapot::INDICES).unwrap(); let vertex_shader_src = r#" #version 150 in vec3 position; in vec3 normal; out vec3 v_normal; uniform mat4 matrix; void main() { v_normal = transpose(inverse(mat3(matrix))) * normal; gl_Position = matrix * vec4(position, 1.0); } "#; let fragment_shader_src = r#" #version 140 in vec3 v_normal; out vec4 color; uniform vec3 u_light; void main() { float brightness = dot(normalize(v_normal), normalize(u_light)); vec3 dark_color = vec3(0.6, 0.0, 0.0); vec3 regular_color = vec3(1.0, 0.0, 0.0); color = vec4(mix(dark_color, regular_color, brightness), 1.0); } "#; let program = glium::Program::from_source(&display, vertex_shader_src, fragment_shader_src, None) .expect("Shader programs failed to compile"); let mut t: f32 = 0.0; let mut closed = false; while !closed { t += 0.00002; //if t > 2.0 { // t = 0.0; //} let uniforms = uniform! { matrix: [ [1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [/*t*/ 0.0, 0.0, 0.0, 100.0f32], ], u_light: [-1.0, 0.4, 0.9f32], }; let params = glium::DrawParameters { depth: glium::Depth { test: glium::draw_parameters::DepthTest::IfLess, write: true, .. Default::default() }, .. Default::default() }; let mut target = display.draw(); //Returns frame object onto which we will draw target.clear_color_and_depth((0.0, 0.0, 1.0, 1.0),1.0); //Change the clear colour target.draw((&positions, &normals), &indices, &program, &uniforms, &params).unwrap(); target.finish().unwrap(); //Draw the frame onto the screen events_loop.poll_events(|ev| { match ev { glutin::Event::WindowEvent {event, ..} => match event { glutin::WindowEvent::CloseRequested => { closed = true; println!("Closing window!!!"); }, _ => (), } _ => (), } }); } }
extern crate x11_clipboard; use x11_clipboard::Clipboard; fn main() { let clipboard = Clipboard::new().unwrap(); let val = clipboard.load( clipboard.setter.atoms.clipboard, clipboard.setter.atoms.utf8_string, clipboard.setter.atoms.property, None ) .unwrap(); let val = String::from_utf8(val).unwrap(); print!("{}", val); }
use wasm_bindgen::prelude::*; #[wasm_bindgen] extern { #[wasm_bindgen(js_namespace = console)] fn log(s: &str); } #[wasm_bindgen] extern { pub type Data; #[wasm_bindgen(method)] fn show(this: &Data); #[wasm_bindgen(method, getter)] fn name(this: &Data) -> String; #[wasm_bindgen(method, getter)] fn value(this: &Data) -> i32; } #[wasm_bindgen] pub fn run(d: &Data) { let s = format!("*** name: {}, value: {}", d.name(), d.value()); log(&s); d.show(); }
use super::{PyType, PyTypeRef}; use crate::{ builtins::PyTupleRef, class::PyClassImpl, function::PosArgs, protocol::{PyIter, PyIterReturn}, types::{Constructor, IterNext, Iterable, SelfIter}, Context, Py, PyObjectRef, PyPayload, PyResult, VirtualMachine, }; #[pyclass(module = false, name = "map", traverse)] #[derive(Debug)] pub struct PyMap { mapper: PyObjectRef, iterators: Vec<PyIter>, } impl PyPayload for PyMap { fn class(ctx: &Context) -> &'static Py<PyType> { ctx.types.map_type } } impl Constructor for PyMap { type Args = (PyObjectRef, PosArgs<PyIter>); fn py_new(cls: PyTypeRef, (mapper, iterators): Self::Args, vm: &VirtualMachine) -> PyResult { let iterators = iterators.into_vec(); PyMap { mapper, iterators } .into_ref_with_type(vm, cls) .map(Into::into) } } #[pyclass(with(IterNext, Iterable, Constructor), flags(BASETYPE))] impl PyMap { #[pymethod(magic)] fn length_hint(&self, vm: &VirtualMachine) -> PyResult<usize> { self.iterators.iter().try_fold(0, |prev, cur| { let cur = cur.as_ref().to_owned().length_hint(0, vm)?; let max = std::cmp::max(prev, cur); Ok(max) }) } #[pymethod(magic)] fn reduce(&self, vm: &VirtualMachine) -> (PyTypeRef, PyTupleRef) { let mut vec = vec![self.mapper.clone()]; vec.extend(self.iterators.iter().map(|o| o.clone().into())); (vm.ctx.types.map_type.to_owned(), vm.new_tuple(vec)) } } impl SelfIter for PyMap {} impl IterNext for PyMap { fn next(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<PyIterReturn> { let mut next_objs = Vec::new(); for iterator in &zelf.iterators { let item = match iterator.next(vm)? { PyIterReturn::Return(obj) => obj, PyIterReturn::StopIteration(v) => return Ok(PyIterReturn::StopIteration(v)), }; next_objs.push(item); } // the mapper itself can raise StopIteration which does stop the map iteration PyIterReturn::from_pyresult(zelf.mapper.call(next_objs, vm), vm) } } pub fn init(context: &Context) { PyMap::extend_class(context, context.types.map_type); }
#![feature(ptr_as_ref)] #![feature(custom_derive)] pub mod stack; pub mod concurrent_stack;
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] #[cfg(feature = "Media_AppBroadcasting")] pub mod AppBroadcasting; #[cfg(feature = "Media_AppRecording")] pub mod AppRecording; #[cfg(feature = "Media_Audio")] pub mod Audio; #[cfg(feature = "Media_Capture")] pub mod Capture; #[cfg(feature = "Media_Casting")] pub mod Casting; #[cfg(feature = "Media_ClosedCaptioning")] pub mod ClosedCaptioning; #[cfg(feature = "Media_ContentRestrictions")] pub mod ContentRestrictions; #[cfg(feature = "Media_Control")] pub mod Control; #[cfg(feature = "Media_Core")] pub mod Core; #[cfg(feature = "Media_Devices")] pub mod Devices; #[cfg(feature = "Media_DialProtocol")] pub mod DialProtocol; #[cfg(feature = "Media_Editing")] pub mod Editing; #[cfg(feature = "Media_Effects")] pub mod Effects; #[cfg(feature = "Media_FaceAnalysis")] pub mod FaceAnalysis; #[cfg(feature = "Media_Import")] pub mod Import; #[cfg(feature = "Media_MediaProperties")] pub mod MediaProperties; #[cfg(feature = "Media_Miracast")] pub mod Miracast; #[cfg(feature = "Media_Ocr")] pub mod Ocr; #[cfg(feature = "Media_PlayTo")] pub mod PlayTo; #[cfg(feature = "Media_Playback")] pub mod Playback; #[cfg(feature = "Media_Playlists")] pub mod Playlists; #[cfg(feature = "Media_Protection")] pub mod Protection; #[cfg(feature = "Media_Render")] pub mod Render; #[cfg(feature = "Media_SpeechRecognition")] pub mod SpeechRecognition; #[cfg(feature = "Media_SpeechSynthesis")] pub mod SpeechSynthesis; #[cfg(feature = "Media_Streaming")] pub mod Streaming; #[cfg(feature = "Media_Transcoding")] pub mod Transcoding; #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct AudioBuffer(pub ::windows::core::IInspectable); impl AudioBuffer { pub fn Capacity(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn Length(&self) -> ::windows::core::Result<u32> { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn SetLength(&self, value: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation")] pub fn CreateReference(&self) -> ::windows::core::Result<super::Foundation::IMemoryBufferReference> { let this = &::windows::core::Interface::cast::<super::Foundation::IMemoryBuffer>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::IMemoryBufferReference>(result__) } } } unsafe impl ::windows::core::RuntimeType for AudioBuffer { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.AudioBuffer;{35175827-724b-4c6a-b130-f6537f9ae0d0})"); } unsafe impl ::windows::core::Interface for AudioBuffer { type Vtable = IAudioBuffer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x35175827_724b_4c6a_b130_f6537f9ae0d0); } impl ::windows::core::RuntimeName for AudioBuffer { const NAME: &'static str = "Windows.Media.AudioBuffer"; } impl ::core::convert::From<AudioBuffer> for ::windows::core::IUnknown { fn from(value: AudioBuffer) -> Self { value.0 .0 } } impl ::core::convert::From<&AudioBuffer> for ::windows::core::IUnknown { fn from(value: &AudioBuffer) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for AudioBuffer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a AudioBuffer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<AudioBuffer> for ::windows::core::IInspectable { fn from(value: AudioBuffer) -> Self { value.0 } } impl ::core::convert::From<&AudioBuffer> for ::windows::core::IInspectable { fn from(value: &AudioBuffer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for AudioBuffer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a AudioBuffer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<AudioBuffer> for super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: AudioBuffer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&AudioBuffer> for super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &AudioBuffer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::Foundation::IClosable> for AudioBuffer { fn into_param(self) -> ::windows::core::Param<'a, super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::Foundation::IClosable> for &AudioBuffer { fn into_param(self) -> ::windows::core::Param<'a, super::Foundation::IClosable> { ::core::convert::TryInto::<super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<AudioBuffer> for super::Foundation::IMemoryBuffer { type Error = ::windows::core::Error; fn try_from(value: AudioBuffer) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&AudioBuffer> for super::Foundation::IMemoryBuffer { type Error = ::windows::core::Error; fn try_from(value: &AudioBuffer) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::Foundation::IMemoryBuffer> for AudioBuffer { fn into_param(self) -> ::windows::core::Param<'a, super::Foundation::IMemoryBuffer> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::Foundation::IMemoryBuffer> for &AudioBuffer { fn into_param(self) -> ::windows::core::Param<'a, super::Foundation::IMemoryBuffer> { ::core::convert::TryInto::<super::Foundation::IMemoryBuffer>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } unsafe impl ::core::marker::Send for AudioBuffer {} unsafe impl ::core::marker::Sync for AudioBuffer {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct AudioBufferAccessMode(pub i32); impl AudioBufferAccessMode { pub const Read: AudioBufferAccessMode = AudioBufferAccessMode(0i32); pub const ReadWrite: AudioBufferAccessMode = AudioBufferAccessMode(1i32); pub const Write: AudioBufferAccessMode = AudioBufferAccessMode(2i32); } impl ::core::convert::From<i32> for AudioBufferAccessMode { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AudioBufferAccessMode { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AudioBufferAccessMode { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.AudioBufferAccessMode;i4)"); } impl ::windows::core::DefaultType for AudioBufferAccessMode { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct AudioFrame(pub ::windows::core::IInspectable); impl AudioFrame { pub fn LockBuffer(&self, mode: AudioBufferAccessMode) -> ::windows::core::Result<AudioBuffer> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), mode, &mut result__).from_abi::<AudioBuffer>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Type(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn IsReadOnly(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation")] pub fn SetRelativeTime<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::IReference<super::Foundation::TimeSpan>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn RelativeTime(&self) -> ::windows::core::Result<super::Foundation::IReference<super::Foundation::TimeSpan>> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::IReference<super::Foundation::TimeSpan>>(result__) } } #[cfg(feature = "Foundation")] pub fn SetSystemRelativeTime<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::IReference<super::Foundation::TimeSpan>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn SystemRelativeTime(&self) -> ::windows::core::Result<super::Foundation::IReference<super::Foundation::TimeSpan>> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::IReference<super::Foundation::TimeSpan>>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDuration<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::IReference<super::Foundation::TimeSpan>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Duration(&self) -> ::windows::core::Result<super::Foundation::IReference<super::Foundation::TimeSpan>> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::IReference<super::Foundation::TimeSpan>>(result__) } } pub fn SetIsDiscontinuous(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsDiscontinuous(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn ExtendedProperties(&self) -> ::windows::core::Result<super::Foundation::Collections::IPropertySet> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::Collections::IPropertySet>(result__) } } pub fn Create(capacity: u32) -> ::windows::core::Result<AudioFrame> { Self::IAudioFrameFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), capacity, &mut result__).from_abi::<AudioFrame>(result__) }) } pub fn IAudioFrameFactory<R, F: FnOnce(&IAudioFrameFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<AudioFrame, IAudioFrameFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for AudioFrame { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.AudioFrame;{e36ac304-aab2-4277-9ed0-43cedf8e29c6})"); } unsafe impl ::windows::core::Interface for AudioFrame { type Vtable = IAudioFrame_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe36ac304_aab2_4277_9ed0_43cedf8e29c6); } impl ::windows::core::RuntimeName for AudioFrame { const NAME: &'static str = "Windows.Media.AudioFrame"; } impl ::core::convert::From<AudioFrame> for ::windows::core::IUnknown { fn from(value: AudioFrame) -> Self { value.0 .0 } } impl ::core::convert::From<&AudioFrame> for ::windows::core::IUnknown { fn from(value: &AudioFrame) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for AudioFrame { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a AudioFrame { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<AudioFrame> for ::windows::core::IInspectable { fn from(value: AudioFrame) -> Self { value.0 } } impl ::core::convert::From<&AudioFrame> for ::windows::core::IInspectable { fn from(value: &AudioFrame) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for AudioFrame { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a AudioFrame { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<AudioFrame> for super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: AudioFrame) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&AudioFrame> for super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &AudioFrame) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::Foundation::IClosable> for AudioFrame { fn into_param(self) -> ::windows::core::Param<'a, super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::Foundation::IClosable> for &AudioFrame { fn into_param(self) -> ::windows::core::Param<'a, super::Foundation::IClosable> { ::core::convert::TryInto::<super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<AudioFrame> for IMediaFrame { type Error = ::windows::core::Error; fn try_from(value: AudioFrame) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&AudioFrame> for IMediaFrame { type Error = ::windows::core::Error; fn try_from(value: &AudioFrame) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IMediaFrame> for AudioFrame { fn into_param(self) -> ::windows::core::Param<'a, IMediaFrame> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IMediaFrame> for &AudioFrame { fn into_param(self) -> ::windows::core::Param<'a, IMediaFrame> { ::core::convert::TryInto::<IMediaFrame>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } unsafe impl ::core::marker::Send for AudioFrame {} unsafe impl ::core::marker::Sync for AudioFrame {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct AudioProcessing(pub i32); impl AudioProcessing { pub const Default: AudioProcessing = AudioProcessing(0i32); pub const Raw: AudioProcessing = AudioProcessing(1i32); } impl ::core::convert::From<i32> for AudioProcessing { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for AudioProcessing { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for AudioProcessing { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.AudioProcessing;i4)"); } impl ::windows::core::DefaultType for AudioProcessing { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct AutoRepeatModeChangeRequestedEventArgs(pub ::windows::core::IInspectable); impl AutoRepeatModeChangeRequestedEventArgs { pub fn RequestedAutoRepeatMode(&self) -> ::windows::core::Result<MediaPlaybackAutoRepeatMode> { let this = self; unsafe { let mut result__: MediaPlaybackAutoRepeatMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackAutoRepeatMode>(result__) } } } unsafe impl ::windows::core::RuntimeType for AutoRepeatModeChangeRequestedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.AutoRepeatModeChangeRequestedEventArgs;{ea137efa-d852-438e-882b-c990109a78f4})"); } unsafe impl ::windows::core::Interface for AutoRepeatModeChangeRequestedEventArgs { type Vtable = IAutoRepeatModeChangeRequestedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xea137efa_d852_438e_882b_c990109a78f4); } impl ::windows::core::RuntimeName for AutoRepeatModeChangeRequestedEventArgs { const NAME: &'static str = "Windows.Media.AutoRepeatModeChangeRequestedEventArgs"; } impl ::core::convert::From<AutoRepeatModeChangeRequestedEventArgs> for ::windows::core::IUnknown { fn from(value: AutoRepeatModeChangeRequestedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&AutoRepeatModeChangeRequestedEventArgs> for ::windows::core::IUnknown { fn from(value: &AutoRepeatModeChangeRequestedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for AutoRepeatModeChangeRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a AutoRepeatModeChangeRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<AutoRepeatModeChangeRequestedEventArgs> for ::windows::core::IInspectable { fn from(value: AutoRepeatModeChangeRequestedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&AutoRepeatModeChangeRequestedEventArgs> for ::windows::core::IInspectable { fn from(value: &AutoRepeatModeChangeRequestedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for AutoRepeatModeChangeRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a AutoRepeatModeChangeRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for AutoRepeatModeChangeRequestedEventArgs {} unsafe impl ::core::marker::Sync for AutoRepeatModeChangeRequestedEventArgs {} #[repr(transparent)] #[doc(hidden)] pub struct IAudioBuffer(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAudioBuffer { type Vtable = IAudioBuffer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x35175827_724b_4c6a_b130_f6537f9ae0d0); } #[repr(C)] #[doc(hidden)] pub struct IAudioBuffer_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAudioFrame(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAudioFrame { type Vtable = IAudioFrame_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe36ac304_aab2_4277_9ed0_43cedf8e29c6); } #[repr(C)] #[doc(hidden)] pub struct IAudioFrame_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, mode: AudioBufferAccessMode, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAudioFrameFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAudioFrameFactory { type Vtable = IAudioFrameFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x91a90ade_2422_40a6_b9ad_30d02404317d); } #[repr(C)] #[doc(hidden)] pub struct IAudioFrameFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, capacity: u32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IAutoRepeatModeChangeRequestedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IAutoRepeatModeChangeRequestedEventArgs { type Vtable = IAutoRepeatModeChangeRequestedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xea137efa_d852_438e_882b_c990109a78f4); } #[repr(C)] #[doc(hidden)] pub struct IAutoRepeatModeChangeRequestedEventArgs_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MediaPlaybackAutoRepeatMode) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IImageDisplayProperties(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IImageDisplayProperties { type Vtable = IImageDisplayProperties_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcd0bc7ef_54e7_411f_9933_f0e98b0a96d2); } #[repr(C)] #[doc(hidden)] pub struct IImageDisplayProperties_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IMediaControl(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaControl { type Vtable = IMediaControl_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x98f1fbe1_7a8d_42cb_b6fe_8fe698264f13); } #[repr(C)] #[doc(hidden)] pub struct IMediaControl_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cookie: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cookie: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cookie: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cookie: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cookie: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cookie: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cookie: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cookie: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cookie: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cookie: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cookie: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cookie: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut SoundLevel) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMediaExtension(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaExtension { type Vtable = IMediaExtension_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x07915118_45df_442b_8a3f_f7826a6370ab); } impl IMediaExtension { #[cfg(feature = "Foundation_Collections")] pub fn SetProperties<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::Collections::IPropertySet>>(&self, configuration: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), configuration.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for IMediaExtension { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{07915118-45df-442b-8a3f-f7826a6370ab}"); } impl ::core::convert::From<IMediaExtension> for ::windows::core::IUnknown { fn from(value: IMediaExtension) -> Self { value.0 .0 } } impl ::core::convert::From<&IMediaExtension> for ::windows::core::IUnknown { fn from(value: &IMediaExtension) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMediaExtension { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IMediaExtension { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<IMediaExtension> for ::windows::core::IInspectable { fn from(value: IMediaExtension) -> Self { value.0 } } impl ::core::convert::From<&IMediaExtension> for ::windows::core::IInspectable { fn from(value: &IMediaExtension) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for IMediaExtension { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a IMediaExtension { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IMediaExtension_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, configuration: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IMediaExtensionManager(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaExtensionManager { type Vtable = IMediaExtensionManager_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4a25eaf5_242d_4dfb_97f4_69b7c42576ff); } #[repr(C)] #[doc(hidden)] pub struct IMediaExtensionManager_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, activatableclassid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, scheme: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, activatableclassid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, scheme: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, configuration: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, activatableclassid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, fileextension: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, mimetype: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, activatableclassid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, fileextension: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, mimetype: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, configuration: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, activatableclassid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, inputsubtype: ::windows::core::GUID, outputsubtype: ::windows::core::GUID) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, activatableclassid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, inputsubtype: ::windows::core::GUID, outputsubtype: ::windows::core::GUID, configuration: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, activatableclassid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, inputsubtype: ::windows::core::GUID, outputsubtype: ::windows::core::GUID) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, activatableclassid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, inputsubtype: ::windows::core::GUID, outputsubtype: ::windows::core::GUID, configuration: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, activatableclassid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, inputsubtype: ::windows::core::GUID, outputsubtype: ::windows::core::GUID) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, activatableclassid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, inputsubtype: ::windows::core::GUID, outputsubtype: ::windows::core::GUID, configuration: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, activatableclassid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, inputsubtype: ::windows::core::GUID, outputsubtype: ::windows::core::GUID) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, activatableclassid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, inputsubtype: ::windows::core::GUID, outputsubtype: ::windows::core::GUID, configuration: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IMediaExtensionManager2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaExtensionManager2 { type Vtable = IMediaExtensionManager2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5bcebf47_4043_4fed_acaf_54ec29dfb1f7); } #[repr(C)] #[doc(hidden)] pub struct IMediaExtensionManager2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "ApplicationModel_AppService")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, extension: ::windows::core::RawPtr, connection: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "ApplicationModel_AppService"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMediaFrame(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaFrame { type Vtable = IMediaFrame_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbfb52f8c_5943_47d8_8e10_05308aa5fbd0); } impl IMediaFrame { pub fn Type(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn IsReadOnly(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation")] pub fn SetRelativeTime<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::IReference<super::Foundation::TimeSpan>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn RelativeTime(&self) -> ::windows::core::Result<super::Foundation::IReference<super::Foundation::TimeSpan>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::IReference<super::Foundation::TimeSpan>>(result__) } } #[cfg(feature = "Foundation")] pub fn SetSystemRelativeTime<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::IReference<super::Foundation::TimeSpan>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn SystemRelativeTime(&self) -> ::windows::core::Result<super::Foundation::IReference<super::Foundation::TimeSpan>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::IReference<super::Foundation::TimeSpan>>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDuration<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::IReference<super::Foundation::TimeSpan>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Duration(&self) -> ::windows::core::Result<super::Foundation::IReference<super::Foundation::TimeSpan>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::IReference<super::Foundation::TimeSpan>>(result__) } } pub fn SetIsDiscontinuous(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsDiscontinuous(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn ExtendedProperties(&self) -> ::windows::core::Result<super::Foundation::Collections::IPropertySet> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::Collections::IPropertySet>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } } unsafe impl ::windows::core::RuntimeType for IMediaFrame { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{bfb52f8c-5943-47d8-8e10-05308aa5fbd0}"); } impl ::core::convert::From<IMediaFrame> for ::windows::core::IUnknown { fn from(value: IMediaFrame) -> Self { value.0 .0 } } impl ::core::convert::From<&IMediaFrame> for ::windows::core::IUnknown { fn from(value: &IMediaFrame) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMediaFrame { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IMediaFrame { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<IMediaFrame> for ::windows::core::IInspectable { fn from(value: IMediaFrame) -> Self { value.0 } } impl ::core::convert::From<&IMediaFrame> for ::windows::core::IInspectable { fn from(value: &IMediaFrame) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for IMediaFrame { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a IMediaFrame { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<IMediaFrame> for super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: IMediaFrame) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&IMediaFrame> for super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &IMediaFrame) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::Foundation::IClosable> for IMediaFrame { fn into_param(self) -> ::windows::core::Param<'a, super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::Foundation::IClosable> for &IMediaFrame { fn into_param(self) -> ::windows::core::Param<'a, super::Foundation::IClosable> { ::core::convert::TryInto::<super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } #[repr(C)] #[doc(hidden)] pub struct IMediaFrame_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMediaMarker(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaMarker { type Vtable = IMediaMarker_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1803def8_dca5_4b6f_9c20_e3d3c0643625); } impl IMediaMarker { #[cfg(feature = "Foundation")] pub fn Time(&self) -> ::windows::core::Result<super::Foundation::TimeSpan> { let this = self; unsafe { let mut result__: super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::TimeSpan>(result__) } } pub fn MediaMarkerType(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn Text(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } } unsafe impl ::windows::core::RuntimeType for IMediaMarker { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{1803def8-dca5-4b6f-9c20-e3d3c0643625}"); } impl ::core::convert::From<IMediaMarker> for ::windows::core::IUnknown { fn from(value: IMediaMarker) -> Self { value.0 .0 } } impl ::core::convert::From<&IMediaMarker> for ::windows::core::IUnknown { fn from(value: &IMediaMarker) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMediaMarker { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IMediaMarker { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<IMediaMarker> for ::windows::core::IInspectable { fn from(value: IMediaMarker) -> Self { value.0 } } impl ::core::convert::From<&IMediaMarker> for ::windows::core::IInspectable { fn from(value: &IMediaMarker) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for IMediaMarker { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a IMediaMarker { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IMediaMarker_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IMediaMarkerTypesStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaMarkerTypesStatics { type Vtable = IMediaMarkerTypesStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbb198040_482f_4743_8832_45853821ece0); } #[repr(C)] #[doc(hidden)] pub struct IMediaMarkerTypesStatics_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMediaMarkers(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaMarkers { type Vtable = IMediaMarkers_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xafeab189_f8dd_466e_aa10_920b52353fdf); } impl IMediaMarkers { #[cfg(feature = "Foundation_Collections")] pub fn Markers(&self) -> ::windows::core::Result<super::Foundation::Collections::IVectorView<IMediaMarker>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::Collections::IVectorView<IMediaMarker>>(result__) } } } unsafe impl ::windows::core::RuntimeType for IMediaMarkers { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{afeab189-f8dd-466e-aa10-920b52353fdf}"); } impl ::core::convert::From<IMediaMarkers> for ::windows::core::IUnknown { fn from(value: IMediaMarkers) -> Self { value.0 .0 } } impl ::core::convert::From<&IMediaMarkers> for ::windows::core::IUnknown { fn from(value: &IMediaMarkers) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMediaMarkers { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IMediaMarkers { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<IMediaMarkers> for ::windows::core::IInspectable { fn from(value: IMediaMarkers) -> Self { value.0 } } impl ::core::convert::From<&IMediaMarkers> for ::windows::core::IInspectable { fn from(value: &IMediaMarkers) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for IMediaMarkers { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a IMediaMarkers { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IMediaMarkers_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IMediaProcessingTriggerDetails(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaProcessingTriggerDetails { type Vtable = IMediaProcessingTriggerDetails_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeb8564ac_a351_4f4e_b4f0_9bf2408993db); } #[repr(C)] #[doc(hidden)] pub struct IMediaProcessingTriggerDetails_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IMediaTimelineController(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaTimelineController { type Vtable = IMediaTimelineController_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8ed361f3_0b78_4360_bf71_0c841999ea1b); } #[repr(C)] #[doc(hidden)] pub struct IMediaTimelineController_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MediaTimelineControllerState) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, positionchangedeventhandler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, eventcookie: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, statechangedeventhandler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, eventcookie: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IMediaTimelineController2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaTimelineController2 { type Vtable = IMediaTimelineController2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xef74ea38_9e72_4df9_8355_6e90c81bbadd); } #[repr(C)] #[doc(hidden)] pub struct IMediaTimelineController2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, eventhandler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, eventhandler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IMediaTimelineControllerFailedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMediaTimelineControllerFailedEventArgs { type Vtable = IMediaTimelineControllerFailedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8821f81d_3e77_43fb_be26_4fc87a044834); } #[repr(C)] #[doc(hidden)] pub struct IMediaTimelineControllerFailedEventArgs_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::HRESULT) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IMusicDisplayProperties(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMusicDisplayProperties { type Vtable = IMusicDisplayProperties_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6bbf0c59_d0a0_4d26_92a0_f978e1d18e7b); } #[repr(C)] #[doc(hidden)] pub struct IMusicDisplayProperties_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IMusicDisplayProperties2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMusicDisplayProperties2 { type Vtable = IMusicDisplayProperties2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x00368462_97d3_44b9_b00f_008afcefaf18); } #[repr(C)] #[doc(hidden)] pub struct IMusicDisplayProperties2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: u32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IMusicDisplayProperties3(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IMusicDisplayProperties3 { type Vtable = IMusicDisplayProperties3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4db51ac1_0681_4e8c_9401_b8159d9eefc7); } #[repr(C)] #[doc(hidden)] pub struct IMusicDisplayProperties3_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IPlaybackPositionChangeRequestedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPlaybackPositionChangeRequestedEventArgs { type Vtable = IPlaybackPositionChangeRequestedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb4493f88_eb28_4961_9c14_335e44f3e125); } #[repr(C)] #[doc(hidden)] pub struct IPlaybackPositionChangeRequestedEventArgs_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IPlaybackRateChangeRequestedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IPlaybackRateChangeRequestedEventArgs { type Vtable = IPlaybackRateChangeRequestedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2ce2c41f_3cd6_4f77_9ba7_eb27c26a2140); } #[repr(C)] #[doc(hidden)] pub struct IPlaybackRateChangeRequestedEventArgs_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f64) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IShuffleEnabledChangeRequestedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IShuffleEnabledChangeRequestedEventArgs { type Vtable = IShuffleEnabledChangeRequestedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x49b593fe_4fd0_4666_a314_c0e01940d302); } #[repr(C)] #[doc(hidden)] pub struct IShuffleEnabledChangeRequestedEventArgs_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ISystemMediaTransportControls(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISystemMediaTransportControls { type Vtable = ISystemMediaTransportControls_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x99fa3ff4_1742_42a6_902e_087d41f965ec); } #[repr(C)] #[doc(hidden)] pub struct ISystemMediaTransportControls_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MediaPlaybackStatus) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: MediaPlaybackStatus) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut SoundLevel) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ISystemMediaTransportControls2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISystemMediaTransportControls2 { type Vtable = ISystemMediaTransportControls2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xea98d2f6_7f3c_4af2_a586_72889808efb1); } #[repr(C)] #[doc(hidden)] pub struct ISystemMediaTransportControls2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MediaPlaybackAutoRepeatMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: MediaPlaybackAutoRepeatMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, timelineproperties: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ISystemMediaTransportControlsButtonPressedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISystemMediaTransportControlsButtonPressedEventArgs { type Vtable = ISystemMediaTransportControlsButtonPressedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb7f47116_a56f_4dc8_9e11_92031f4a87c2); } #[repr(C)] #[doc(hidden)] pub struct ISystemMediaTransportControlsButtonPressedEventArgs_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut SystemMediaTransportControlsButton) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ISystemMediaTransportControlsDisplayUpdater(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISystemMediaTransportControlsDisplayUpdater { type Vtable = ISystemMediaTransportControlsDisplayUpdater_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8abbc53e_fa55_4ecf_ad8e_c984e5dd1550); } #[repr(C)] #[doc(hidden)] pub struct ISystemMediaTransportControlsDisplayUpdater_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MediaPlaybackType) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: MediaPlaybackType) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, #[cfg(feature = "Storage_Streams")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Storage_Streams"))] usize, #[cfg(feature = "Storage_Streams")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Storage_Streams"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Foundation", feature = "Storage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, r#type: MediaPlaybackType, source: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Storage")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ISystemMediaTransportControlsPropertyChangedEventArgs(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISystemMediaTransportControlsPropertyChangedEventArgs { type Vtable = ISystemMediaTransportControlsPropertyChangedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd0ca0936_339b_4cb3_8eeb_737607f56e08); } #[repr(C)] #[doc(hidden)] pub struct ISystemMediaTransportControlsPropertyChangedEventArgs_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut SystemMediaTransportControlsProperty) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ISystemMediaTransportControlsStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISystemMediaTransportControlsStatics { type Vtable = ISystemMediaTransportControlsStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x43ba380a_eca4_4832_91ab_d415fae484c6); } #[repr(C)] #[doc(hidden)] pub struct ISystemMediaTransportControlsStatics_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ISystemMediaTransportControlsTimelineProperties(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISystemMediaTransportControlsTimelineProperties { type Vtable = ISystemMediaTransportControlsTimelineProperties_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5125316a_c3a2_475b_8507_93534dc88f15); } #[repr(C)] #[doc(hidden)] pub struct ISystemMediaTransportControlsTimelineProperties_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::Foundation::TimeSpan) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IVideoDisplayProperties(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVideoDisplayProperties { type Vtable = IVideoDisplayProperties_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5609fdb1_5d2d_4872_8170_45dee5bc2f5c); } #[repr(C)] #[doc(hidden)] pub struct IVideoDisplayProperties_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IVideoDisplayProperties2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVideoDisplayProperties2 { type Vtable = IVideoDisplayProperties2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb410e1ce_ab52_41ab_a486_cc10fab152f9); } #[repr(C)] #[doc(hidden)] pub struct IVideoDisplayProperties2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IVideoEffectsStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVideoEffectsStatics { type Vtable = IVideoEffectsStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1fcda5e8_baf1_4521_980c_3bcebb44cf38); } #[repr(C)] #[doc(hidden)] pub struct IVideoEffectsStatics_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct IVideoFrame(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVideoFrame { type Vtable = IVideoFrame_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0cc06625_90fc_4c92_bd95_7ded21819d1c); } #[repr(C)] #[doc(hidden)] pub struct IVideoFrame_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Graphics_Imaging")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_Imaging"))] usize, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, frame: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(feature = "Graphics_DirectX_Direct3D11")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_DirectX_Direct3D11"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IVideoFrame2(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVideoFrame2 { type Vtable = IVideoFrame2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3837840d_336c_4366_8d46_060798736c5d); } #[repr(C)] #[doc(hidden)] pub struct IVideoFrame2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(all(feature = "Foundation", feature = "Graphics_Imaging"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, frame: ::windows::core::RawPtr, sourcebounds: ::windows::core::RawPtr, destinationbounds: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Foundation", feature = "Graphics_Imaging")))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IVideoFrameFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVideoFrameFactory { type Vtable = IVideoFrameFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x014b6d69_2228_4c92_92ff_50c380d3e776); } #[repr(C)] #[doc(hidden)] pub struct IVideoFrameFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Graphics_Imaging")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, format: super::Graphics::Imaging::BitmapPixelFormat, width: i32, height: i32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_Imaging"))] usize, #[cfg(feature = "Graphics_Imaging")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, format: super::Graphics::Imaging::BitmapPixelFormat, width: i32, height: i32, alpha: super::Graphics::Imaging::BitmapAlphaMode, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_Imaging"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct IVideoFrameStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for IVideoFrameStatics { type Vtable = IVideoFrameStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xab2a556f_6111_4b33_8ec3_2b209a02e17a); } #[repr(C)] #[doc(hidden)] pub struct IVideoFrameStatics_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Graphics_DirectX")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, format: super::Graphics::DirectX::DirectXPixelFormat, width: i32, height: i32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_DirectX"))] usize, #[cfg(all(feature = "Graphics_DirectX", feature = "Graphics_DirectX_Direct3D11"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, format: super::Graphics::DirectX::DirectXPixelFormat, width: i32, height: i32, device: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Graphics_DirectX", feature = "Graphics_DirectX_Direct3D11")))] usize, #[cfg(feature = "Graphics_Imaging")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bitmap: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_Imaging"))] usize, #[cfg(feature = "Graphics_DirectX_Direct3D11")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, surface: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Graphics_DirectX_Direct3D11"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ImageDisplayProperties(pub ::windows::core::IInspectable); impl ImageDisplayProperties { pub fn Title(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTitle<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Subtitle(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetSubtitle<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for ImageDisplayProperties { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.ImageDisplayProperties;{cd0bc7ef-54e7-411f-9933-f0e98b0a96d2})"); } unsafe impl ::windows::core::Interface for ImageDisplayProperties { type Vtable = IImageDisplayProperties_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcd0bc7ef_54e7_411f_9933_f0e98b0a96d2); } impl ::windows::core::RuntimeName for ImageDisplayProperties { const NAME: &'static str = "Windows.Media.ImageDisplayProperties"; } impl ::core::convert::From<ImageDisplayProperties> for ::windows::core::IUnknown { fn from(value: ImageDisplayProperties) -> Self { value.0 .0 } } impl ::core::convert::From<&ImageDisplayProperties> for ::windows::core::IUnknown { fn from(value: &ImageDisplayProperties) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ImageDisplayProperties { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ImageDisplayProperties { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ImageDisplayProperties> for ::windows::core::IInspectable { fn from(value: ImageDisplayProperties) -> Self { value.0 } } impl ::core::convert::From<&ImageDisplayProperties> for ::windows::core::IInspectable { fn from(value: &ImageDisplayProperties) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ImageDisplayProperties { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a ImageDisplayProperties { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for ImageDisplayProperties {} unsafe impl ::core::marker::Sync for ImageDisplayProperties {} pub struct MediaControl {} impl MediaControl { #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn SoundLevelChanged<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>(handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { Self::IMediaControl(|this| unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn RemoveSoundLevelChanged<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(cookie: Param0) -> ::windows::core::Result<()> { Self::IMediaControl(|this| unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), cookie.into_param().abi()).ok() }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn PlayPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>(handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { Self::IMediaControl(|this| unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn RemovePlayPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(cookie: Param0) -> ::windows::core::Result<()> { Self::IMediaControl(|this| unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), cookie.into_param().abi()).ok() }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn PausePressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>(handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { Self::IMediaControl(|this| unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn RemovePausePressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(cookie: Param0) -> ::windows::core::Result<()> { Self::IMediaControl(|this| unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), cookie.into_param().abi()).ok() }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn StopPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>(handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { Self::IMediaControl(|this| unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn RemoveStopPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(cookie: Param0) -> ::windows::core::Result<()> { Self::IMediaControl(|this| unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), cookie.into_param().abi()).ok() }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn PlayPauseTogglePressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>(handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { Self::IMediaControl(|this| unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn RemovePlayPauseTogglePressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(cookie: Param0) -> ::windows::core::Result<()> { Self::IMediaControl(|this| unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), cookie.into_param().abi()).ok() }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn RecordPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>(handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { Self::IMediaControl(|this| unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn RemoveRecordPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(cookie: Param0) -> ::windows::core::Result<()> { Self::IMediaControl(|this| unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), cookie.into_param().abi()).ok() }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn NextTrackPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>(handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { Self::IMediaControl(|this| unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn RemoveNextTrackPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(cookie: Param0) -> ::windows::core::Result<()> { Self::IMediaControl(|this| unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), cookie.into_param().abi()).ok() }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn PreviousTrackPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>(handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { Self::IMediaControl(|this| unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn RemovePreviousTrackPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(cookie: Param0) -> ::windows::core::Result<()> { Self::IMediaControl(|this| unsafe { (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), cookie.into_param().abi()).ok() }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn FastForwardPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>(handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { Self::IMediaControl(|this| unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn RemoveFastForwardPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(cookie: Param0) -> ::windows::core::Result<()> { Self::IMediaControl(|this| unsafe { (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), cookie.into_param().abi()).ok() }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn RewindPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>(handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { Self::IMediaControl(|this| unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn RemoveRewindPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(cookie: Param0) -> ::windows::core::Result<()> { Self::IMediaControl(|this| unsafe { (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), cookie.into_param().abi()).ok() }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn ChannelUpPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>(handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { Self::IMediaControl(|this| unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn RemoveChannelUpPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(cookie: Param0) -> ::windows::core::Result<()> { Self::IMediaControl(|this| unsafe { (::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), cookie.into_param().abi()).ok() }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn ChannelDownPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventHandler<::windows::core::IInspectable>>>(handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { Self::IMediaControl(|this| unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn RemoveChannelDownPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(cookie: Param0) -> ::windows::core::Result<()> { Self::IMediaControl(|this| unsafe { (::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), cookie.into_param().abi()).ok() }) } #[cfg(feature = "deprecated")] pub fn SoundLevel() -> ::windows::core::Result<SoundLevel> { Self::IMediaControl(|this| unsafe { let mut result__: SoundLevel = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).30)(::core::mem::transmute_copy(this), &mut result__).from_abi::<SoundLevel>(result__) }) } #[cfg(feature = "deprecated")] pub fn SetTrackName<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(value: Param0) -> ::windows::core::Result<()> { Self::IMediaControl(|this| unsafe { (::windows::core::Interface::vtable(this).31)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }) } #[cfg(feature = "deprecated")] pub fn TrackName() -> ::windows::core::Result<::windows::core::HSTRING> { Self::IMediaControl(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).32)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } #[cfg(feature = "deprecated")] pub fn SetArtistName<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(value: Param0) -> ::windows::core::Result<()> { Self::IMediaControl(|this| unsafe { (::windows::core::Interface::vtable(this).33)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }) } #[cfg(feature = "deprecated")] pub fn ArtistName() -> ::windows::core::Result<::windows::core::HSTRING> { Self::IMediaControl(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).34)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } #[cfg(feature = "deprecated")] pub fn SetIsPlaying(value: bool) -> ::windows::core::Result<()> { Self::IMediaControl(|this| unsafe { (::windows::core::Interface::vtable(this).35)(::core::mem::transmute_copy(this), value).ok() }) } #[cfg(feature = "deprecated")] pub fn IsPlaying() -> ::windows::core::Result<bool> { Self::IMediaControl(|this| unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).36)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn SetAlbumArt<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::Uri>>(value: Param0) -> ::windows::core::Result<()> { Self::IMediaControl(|this| unsafe { (::windows::core::Interface::vtable(this).37)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }) } #[cfg(feature = "deprecated")] #[cfg(feature = "Foundation")] pub fn AlbumArt() -> ::windows::core::Result<super::Foundation::Uri> { Self::IMediaControl(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).38)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::Uri>(result__) }) } pub fn IMediaControl<R, F: FnOnce(&IMediaControl) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<MediaControl, IMediaControl> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } impl ::windows::core::RuntimeName for MediaControl { const NAME: &'static str = "Windows.Media.MediaControl"; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MediaExtensionManager(pub ::windows::core::IInspectable); impl MediaExtensionManager { pub fn new() -> ::windows::core::Result<Self> { Self::IActivationFactory(|f| f.activate_instance::<Self>()) } fn IActivationFactory<R, F: FnOnce(&::windows::core::IActivationFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<MediaExtensionManager, ::windows::core::IActivationFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } pub fn RegisterSchemeHandler<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, activatableclassid: Param0, scheme: Param1) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), activatableclassid.into_param().abi(), scheme.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn RegisterSchemeHandlerWithSettings<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param2: ::windows::core::IntoParam<'a, super::Foundation::Collections::IPropertySet>>(&self, activatableclassid: Param0, scheme: Param1, configuration: Param2) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), activatableclassid.into_param().abi(), scheme.into_param().abi(), configuration.into_param().abi()).ok() } } pub fn RegisterByteStreamHandler<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param2: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, activatableclassid: Param0, fileextension: Param1, mimetype: Param2) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), activatableclassid.into_param().abi(), fileextension.into_param().abi(), mimetype.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn RegisterByteStreamHandlerWithSettings<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param2: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param3: ::windows::core::IntoParam<'a, super::Foundation::Collections::IPropertySet>>(&self, activatableclassid: Param0, fileextension: Param1, mimetype: Param2, configuration: Param3) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), activatableclassid.into_param().abi(), fileextension.into_param().abi(), mimetype.into_param().abi(), configuration.into_param().abi()).ok() } } pub fn RegisterAudioDecoder<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, ::windows::core::GUID>, Param2: ::windows::core::IntoParam<'a, ::windows::core::GUID>>(&self, activatableclassid: Param0, inputsubtype: Param1, outputsubtype: Param2) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), activatableclassid.into_param().abi(), inputsubtype.into_param().abi(), outputsubtype.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn RegisterAudioDecoderWithSettings<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, ::windows::core::GUID>, Param2: ::windows::core::IntoParam<'a, ::windows::core::GUID>, Param3: ::windows::core::IntoParam<'a, super::Foundation::Collections::IPropertySet>>(&self, activatableclassid: Param0, inputsubtype: Param1, outputsubtype: Param2, configuration: Param3) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), activatableclassid.into_param().abi(), inputsubtype.into_param().abi(), outputsubtype.into_param().abi(), configuration.into_param().abi()).ok() } } pub fn RegisterAudioEncoder<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, ::windows::core::GUID>, Param2: ::windows::core::IntoParam<'a, ::windows::core::GUID>>(&self, activatableclassid: Param0, inputsubtype: Param1, outputsubtype: Param2) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), activatableclassid.into_param().abi(), inputsubtype.into_param().abi(), outputsubtype.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn RegisterAudioEncoderWithSettings<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, ::windows::core::GUID>, Param2: ::windows::core::IntoParam<'a, ::windows::core::GUID>, Param3: ::windows::core::IntoParam<'a, super::Foundation::Collections::IPropertySet>>(&self, activatableclassid: Param0, inputsubtype: Param1, outputsubtype: Param2, configuration: Param3) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), activatableclassid.into_param().abi(), inputsubtype.into_param().abi(), outputsubtype.into_param().abi(), configuration.into_param().abi()).ok() } } pub fn RegisterVideoDecoder<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, ::windows::core::GUID>, Param2: ::windows::core::IntoParam<'a, ::windows::core::GUID>>(&self, activatableclassid: Param0, inputsubtype: Param1, outputsubtype: Param2) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), activatableclassid.into_param().abi(), inputsubtype.into_param().abi(), outputsubtype.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn RegisterVideoDecoderWithSettings<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, ::windows::core::GUID>, Param2: ::windows::core::IntoParam<'a, ::windows::core::GUID>, Param3: ::windows::core::IntoParam<'a, super::Foundation::Collections::IPropertySet>>(&self, activatableclassid: Param0, inputsubtype: Param1, outputsubtype: Param2, configuration: Param3) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), activatableclassid.into_param().abi(), inputsubtype.into_param().abi(), outputsubtype.into_param().abi(), configuration.into_param().abi()).ok() } } pub fn RegisterVideoEncoder<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, ::windows::core::GUID>, Param2: ::windows::core::IntoParam<'a, ::windows::core::GUID>>(&self, activatableclassid: Param0, inputsubtype: Param1, outputsubtype: Param2) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), activatableclassid.into_param().abi(), inputsubtype.into_param().abi(), outputsubtype.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn RegisterVideoEncoderWithSettings<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, ::windows::core::GUID>, Param2: ::windows::core::IntoParam<'a, ::windows::core::GUID>, Param3: ::windows::core::IntoParam<'a, super::Foundation::Collections::IPropertySet>>(&self, activatableclassid: Param0, inputsubtype: Param1, outputsubtype: Param2, configuration: Param3) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), activatableclassid.into_param().abi(), inputsubtype.into_param().abi(), outputsubtype.into_param().abi(), configuration.into_param().abi()).ok() } } #[cfg(feature = "ApplicationModel_AppService")] pub fn RegisterMediaExtensionForAppService<'a, Param0: ::windows::core::IntoParam<'a, IMediaExtension>, Param1: ::windows::core::IntoParam<'a, super::ApplicationModel::AppService::AppServiceConnection>>(&self, extension: Param0, connection: Param1) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IMediaExtensionManager2>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), extension.into_param().abi(), connection.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for MediaExtensionManager { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.MediaExtensionManager;{4a25eaf5-242d-4dfb-97f4-69b7c42576ff})"); } unsafe impl ::windows::core::Interface for MediaExtensionManager { type Vtable = IMediaExtensionManager_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4a25eaf5_242d_4dfb_97f4_69b7c42576ff); } impl ::windows::core::RuntimeName for MediaExtensionManager { const NAME: &'static str = "Windows.Media.MediaExtensionManager"; } impl ::core::convert::From<MediaExtensionManager> for ::windows::core::IUnknown { fn from(value: MediaExtensionManager) -> Self { value.0 .0 } } impl ::core::convert::From<&MediaExtensionManager> for ::windows::core::IUnknown { fn from(value: &MediaExtensionManager) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaExtensionManager { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaExtensionManager { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MediaExtensionManager> for ::windows::core::IInspectable { fn from(value: MediaExtensionManager) -> Self { value.0 } } impl ::core::convert::From<&MediaExtensionManager> for ::windows::core::IInspectable { fn from(value: &MediaExtensionManager) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaExtensionManager { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaExtensionManager { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for MediaExtensionManager {} unsafe impl ::core::marker::Sync for MediaExtensionManager {} pub struct MediaMarkerTypes {} impl MediaMarkerTypes { pub fn Bookmark() -> ::windows::core::Result<::windows::core::HSTRING> { Self::IMediaMarkerTypesStatics(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } pub fn IMediaMarkerTypesStatics<R, F: FnOnce(&IMediaMarkerTypesStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<MediaMarkerTypes, IMediaMarkerTypesStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } impl ::windows::core::RuntimeName for MediaMarkerTypes { const NAME: &'static str = "Windows.Media.MediaMarkerTypes"; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct MediaPlaybackAutoRepeatMode(pub i32); impl MediaPlaybackAutoRepeatMode { pub const None: MediaPlaybackAutoRepeatMode = MediaPlaybackAutoRepeatMode(0i32); pub const Track: MediaPlaybackAutoRepeatMode = MediaPlaybackAutoRepeatMode(1i32); pub const List: MediaPlaybackAutoRepeatMode = MediaPlaybackAutoRepeatMode(2i32); } impl ::core::convert::From<i32> for MediaPlaybackAutoRepeatMode { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MediaPlaybackAutoRepeatMode { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for MediaPlaybackAutoRepeatMode { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.MediaPlaybackAutoRepeatMode;i4)"); } impl ::windows::core::DefaultType for MediaPlaybackAutoRepeatMode { type DefaultType = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct MediaPlaybackStatus(pub i32); impl MediaPlaybackStatus { pub const Closed: MediaPlaybackStatus = MediaPlaybackStatus(0i32); pub const Changing: MediaPlaybackStatus = MediaPlaybackStatus(1i32); pub const Stopped: MediaPlaybackStatus = MediaPlaybackStatus(2i32); pub const Playing: MediaPlaybackStatus = MediaPlaybackStatus(3i32); pub const Paused: MediaPlaybackStatus = MediaPlaybackStatus(4i32); } impl ::core::convert::From<i32> for MediaPlaybackStatus { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MediaPlaybackStatus { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for MediaPlaybackStatus { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.MediaPlaybackStatus;i4)"); } impl ::windows::core::DefaultType for MediaPlaybackStatus { type DefaultType = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct MediaPlaybackType(pub i32); impl MediaPlaybackType { pub const Unknown: MediaPlaybackType = MediaPlaybackType(0i32); pub const Music: MediaPlaybackType = MediaPlaybackType(1i32); pub const Video: MediaPlaybackType = MediaPlaybackType(2i32); pub const Image: MediaPlaybackType = MediaPlaybackType(3i32); } impl ::core::convert::From<i32> for MediaPlaybackType { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MediaPlaybackType { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for MediaPlaybackType { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.MediaPlaybackType;i4)"); } impl ::windows::core::DefaultType for MediaPlaybackType { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MediaProcessingTriggerDetails(pub ::windows::core::IInspectable); impl MediaProcessingTriggerDetails { #[cfg(feature = "Foundation_Collections")] pub fn Arguments(&self) -> ::windows::core::Result<super::Foundation::Collections::ValueSet> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::Collections::ValueSet>(result__) } } } unsafe impl ::windows::core::RuntimeType for MediaProcessingTriggerDetails { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.MediaProcessingTriggerDetails;{eb8564ac-a351-4f4e-b4f0-9bf2408993db})"); } unsafe impl ::windows::core::Interface for MediaProcessingTriggerDetails { type Vtable = IMediaProcessingTriggerDetails_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeb8564ac_a351_4f4e_b4f0_9bf2408993db); } impl ::windows::core::RuntimeName for MediaProcessingTriggerDetails { const NAME: &'static str = "Windows.Media.MediaProcessingTriggerDetails"; } impl ::core::convert::From<MediaProcessingTriggerDetails> for ::windows::core::IUnknown { fn from(value: MediaProcessingTriggerDetails) -> Self { value.0 .0 } } impl ::core::convert::From<&MediaProcessingTriggerDetails> for ::windows::core::IUnknown { fn from(value: &MediaProcessingTriggerDetails) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaProcessingTriggerDetails { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaProcessingTriggerDetails { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MediaProcessingTriggerDetails> for ::windows::core::IInspectable { fn from(value: MediaProcessingTriggerDetails) -> Self { value.0 } } impl ::core::convert::From<&MediaProcessingTriggerDetails> for ::windows::core::IInspectable { fn from(value: &MediaProcessingTriggerDetails) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaProcessingTriggerDetails { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaProcessingTriggerDetails { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for MediaProcessingTriggerDetails {} unsafe impl ::core::marker::Sync for MediaProcessingTriggerDetails {} #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Foundation")] pub struct MediaTimeRange { pub Start: super::Foundation::TimeSpan, pub End: super::Foundation::TimeSpan, } #[cfg(feature = "Foundation")] impl MediaTimeRange {} #[cfg(feature = "Foundation")] impl ::core::default::Default for MediaTimeRange { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Foundation")] impl ::core::fmt::Debug for MediaTimeRange { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MediaTimeRange").field("Start", &self.Start).field("End", &self.End).finish() } } #[cfg(feature = "Foundation")] impl ::core::cmp::PartialEq for MediaTimeRange { fn eq(&self, other: &Self) -> bool { self.Start == other.Start && self.End == other.End } } #[cfg(feature = "Foundation")] impl ::core::cmp::Eq for MediaTimeRange {} #[cfg(feature = "Foundation")] unsafe impl ::windows::core::Abi for MediaTimeRange { type Abi = Self; } #[cfg(feature = "Foundation")] unsafe impl ::windows::core::RuntimeType for MediaTimeRange { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"struct(Windows.Media.MediaTimeRange;struct(Windows.Foundation.TimeSpan;i8);struct(Windows.Foundation.TimeSpan;i8))"); } #[cfg(feature = "Foundation")] impl ::windows::core::DefaultType for MediaTimeRange { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MediaTimelineController(pub ::windows::core::IInspectable); impl MediaTimelineController { pub fn new() -> ::windows::core::Result<Self> { Self::IActivationFactory(|f| f.activate_instance::<Self>()) } fn IActivationFactory<R, F: FnOnce(&::windows::core::IActivationFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<MediaTimelineController, ::windows::core::IActivationFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } pub fn Start(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Resume(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this)).ok() } } pub fn Pause(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() } } #[cfg(feature = "Foundation")] pub fn Position(&self) -> ::windows::core::Result<super::Foundation::TimeSpan> { let this = self; unsafe { let mut result__: super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetPosition<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn ClockRate(&self) -> ::windows::core::Result<f64> { let this = self; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } pub fn SetClockRate(&self, value: f64) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), value).ok() } } pub fn State(&self) -> ::windows::core::Result<MediaTimelineControllerState> { let this = self; unsafe { let mut result__: MediaTimelineControllerState = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaTimelineControllerState>(result__) } } #[cfg(feature = "Foundation")] pub fn PositionChanged<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::TypedEventHandler<MediaTimelineController, ::windows::core::IInspectable>>>(&self, positionchangedeventhandler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { let this = self; unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), positionchangedeventhandler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemovePositionChanged<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(&self, eventcookie: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), eventcookie.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn StateChanged<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::TypedEventHandler<MediaTimelineController, ::windows::core::IInspectable>>>(&self, statechangedeventhandler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { let this = self; unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), statechangedeventhandler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveStateChanged<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(&self, eventcookie: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), eventcookie.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Duration(&self) -> ::windows::core::Result<super::Foundation::IReference<super::Foundation::TimeSpan>> { let this = &::windows::core::Interface::cast::<IMediaTimelineController2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::IReference<super::Foundation::TimeSpan>>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDuration<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::IReference<super::Foundation::TimeSpan>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IMediaTimelineController2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn IsLoopingEnabled(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IMediaTimelineController2>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsLoopingEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IMediaTimelineController2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn Failed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::TypedEventHandler<MediaTimelineController, MediaTimelineControllerFailedEventArgs>>>(&self, eventhandler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { let this = &::windows::core::Interface::cast::<IMediaTimelineController2>(self)?; unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), eventhandler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveFailed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IMediaTimelineController2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Ended<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::TypedEventHandler<MediaTimelineController, ::windows::core::IInspectable>>>(&self, eventhandler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { let this = &::windows::core::Interface::cast::<IMediaTimelineController2>(self)?; unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), eventhandler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveEnded<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IMediaTimelineController2>(self)?; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for MediaTimelineController { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.MediaTimelineController;{8ed361f3-0b78-4360-bf71-0c841999ea1b})"); } unsafe impl ::windows::core::Interface for MediaTimelineController { type Vtable = IMediaTimelineController_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8ed361f3_0b78_4360_bf71_0c841999ea1b); } impl ::windows::core::RuntimeName for MediaTimelineController { const NAME: &'static str = "Windows.Media.MediaTimelineController"; } impl ::core::convert::From<MediaTimelineController> for ::windows::core::IUnknown { fn from(value: MediaTimelineController) -> Self { value.0 .0 } } impl ::core::convert::From<&MediaTimelineController> for ::windows::core::IUnknown { fn from(value: &MediaTimelineController) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaTimelineController { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaTimelineController { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MediaTimelineController> for ::windows::core::IInspectable { fn from(value: MediaTimelineController) -> Self { value.0 } } impl ::core::convert::From<&MediaTimelineController> for ::windows::core::IInspectable { fn from(value: &MediaTimelineController) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaTimelineController { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaTimelineController { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for MediaTimelineController {} unsafe impl ::core::marker::Sync for MediaTimelineController {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MediaTimelineControllerFailedEventArgs(pub ::windows::core::IInspectable); impl MediaTimelineControllerFailedEventArgs { pub fn ExtendedError(&self) -> ::windows::core::Result<::windows::core::HRESULT> { let this = self; unsafe { let mut result__: ::windows::core::HRESULT = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HRESULT>(result__) } } } unsafe impl ::windows::core::RuntimeType for MediaTimelineControllerFailedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.MediaTimelineControllerFailedEventArgs;{8821f81d-3e77-43fb-be26-4fc87a044834})"); } unsafe impl ::windows::core::Interface for MediaTimelineControllerFailedEventArgs { type Vtable = IMediaTimelineControllerFailedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8821f81d_3e77_43fb_be26_4fc87a044834); } impl ::windows::core::RuntimeName for MediaTimelineControllerFailedEventArgs { const NAME: &'static str = "Windows.Media.MediaTimelineControllerFailedEventArgs"; } impl ::core::convert::From<MediaTimelineControllerFailedEventArgs> for ::windows::core::IUnknown { fn from(value: MediaTimelineControllerFailedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&MediaTimelineControllerFailedEventArgs> for ::windows::core::IUnknown { fn from(value: &MediaTimelineControllerFailedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaTimelineControllerFailedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaTimelineControllerFailedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MediaTimelineControllerFailedEventArgs> for ::windows::core::IInspectable { fn from(value: MediaTimelineControllerFailedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&MediaTimelineControllerFailedEventArgs> for ::windows::core::IInspectable { fn from(value: &MediaTimelineControllerFailedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaTimelineControllerFailedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaTimelineControllerFailedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for MediaTimelineControllerFailedEventArgs {} unsafe impl ::core::marker::Sync for MediaTimelineControllerFailedEventArgs {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct MediaTimelineControllerState(pub i32); impl MediaTimelineControllerState { pub const Paused: MediaTimelineControllerState = MediaTimelineControllerState(0i32); pub const Running: MediaTimelineControllerState = MediaTimelineControllerState(1i32); pub const Stalled: MediaTimelineControllerState = MediaTimelineControllerState(2i32); pub const Error: MediaTimelineControllerState = MediaTimelineControllerState(3i32); } impl ::core::convert::From<i32> for MediaTimelineControllerState { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MediaTimelineControllerState { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for MediaTimelineControllerState { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.MediaTimelineControllerState;i4)"); } impl ::windows::core::DefaultType for MediaTimelineControllerState { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct MusicDisplayProperties(pub ::windows::core::IInspectable); impl MusicDisplayProperties { pub fn Title(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTitle<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn AlbumArtist(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetAlbumArtist<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Artist(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetArtist<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn AlbumTitle(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<IMusicDisplayProperties2>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetAlbumTitle<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IMusicDisplayProperties2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn TrackNumber(&self) -> ::windows::core::Result<u32> { let this = &::windows::core::Interface::cast::<IMusicDisplayProperties2>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn SetTrackNumber(&self, value: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IMusicDisplayProperties2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn Genres(&self) -> ::windows::core::Result<super::Foundation::Collections::IVector<::windows::core::HSTRING>> { let this = &::windows::core::Interface::cast::<IMusicDisplayProperties2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::Collections::IVector<::windows::core::HSTRING>>(result__) } } pub fn AlbumTrackCount(&self) -> ::windows::core::Result<u32> { let this = &::windows::core::Interface::cast::<IMusicDisplayProperties3>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) } } pub fn SetAlbumTrackCount(&self, value: u32) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IMusicDisplayProperties3>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } } unsafe impl ::windows::core::RuntimeType for MusicDisplayProperties { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.MusicDisplayProperties;{6bbf0c59-d0a0-4d26-92a0-f978e1d18e7b})"); } unsafe impl ::windows::core::Interface for MusicDisplayProperties { type Vtable = IMusicDisplayProperties_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6bbf0c59_d0a0_4d26_92a0_f978e1d18e7b); } impl ::windows::core::RuntimeName for MusicDisplayProperties { const NAME: &'static str = "Windows.Media.MusicDisplayProperties"; } impl ::core::convert::From<MusicDisplayProperties> for ::windows::core::IUnknown { fn from(value: MusicDisplayProperties) -> Self { value.0 .0 } } impl ::core::convert::From<&MusicDisplayProperties> for ::windows::core::IUnknown { fn from(value: &MusicDisplayProperties) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MusicDisplayProperties { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MusicDisplayProperties { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<MusicDisplayProperties> for ::windows::core::IInspectable { fn from(value: MusicDisplayProperties) -> Self { value.0 } } impl ::core::convert::From<&MusicDisplayProperties> for ::windows::core::IInspectable { fn from(value: &MusicDisplayProperties) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MusicDisplayProperties { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MusicDisplayProperties { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for MusicDisplayProperties {} unsafe impl ::core::marker::Sync for MusicDisplayProperties {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PlaybackPositionChangeRequestedEventArgs(pub ::windows::core::IInspectable); impl PlaybackPositionChangeRequestedEventArgs { #[cfg(feature = "Foundation")] pub fn RequestedPlaybackPosition(&self) -> ::windows::core::Result<super::Foundation::TimeSpan> { let this = self; unsafe { let mut result__: super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::TimeSpan>(result__) } } } unsafe impl ::windows::core::RuntimeType for PlaybackPositionChangeRequestedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.PlaybackPositionChangeRequestedEventArgs;{b4493f88-eb28-4961-9c14-335e44f3e125})"); } unsafe impl ::windows::core::Interface for PlaybackPositionChangeRequestedEventArgs { type Vtable = IPlaybackPositionChangeRequestedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb4493f88_eb28_4961_9c14_335e44f3e125); } impl ::windows::core::RuntimeName for PlaybackPositionChangeRequestedEventArgs { const NAME: &'static str = "Windows.Media.PlaybackPositionChangeRequestedEventArgs"; } impl ::core::convert::From<PlaybackPositionChangeRequestedEventArgs> for ::windows::core::IUnknown { fn from(value: PlaybackPositionChangeRequestedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&PlaybackPositionChangeRequestedEventArgs> for ::windows::core::IUnknown { fn from(value: &PlaybackPositionChangeRequestedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PlaybackPositionChangeRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a PlaybackPositionChangeRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PlaybackPositionChangeRequestedEventArgs> for ::windows::core::IInspectable { fn from(value: PlaybackPositionChangeRequestedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&PlaybackPositionChangeRequestedEventArgs> for ::windows::core::IInspectable { fn from(value: &PlaybackPositionChangeRequestedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PlaybackPositionChangeRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a PlaybackPositionChangeRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for PlaybackPositionChangeRequestedEventArgs {} unsafe impl ::core::marker::Sync for PlaybackPositionChangeRequestedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct PlaybackRateChangeRequestedEventArgs(pub ::windows::core::IInspectable); impl PlaybackRateChangeRequestedEventArgs { pub fn RequestedPlaybackRate(&self) -> ::windows::core::Result<f64> { let this = self; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } } unsafe impl ::windows::core::RuntimeType for PlaybackRateChangeRequestedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.PlaybackRateChangeRequestedEventArgs;{2ce2c41f-3cd6-4f77-9ba7-eb27c26a2140})"); } unsafe impl ::windows::core::Interface for PlaybackRateChangeRequestedEventArgs { type Vtable = IPlaybackRateChangeRequestedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2ce2c41f_3cd6_4f77_9ba7_eb27c26a2140); } impl ::windows::core::RuntimeName for PlaybackRateChangeRequestedEventArgs { const NAME: &'static str = "Windows.Media.PlaybackRateChangeRequestedEventArgs"; } impl ::core::convert::From<PlaybackRateChangeRequestedEventArgs> for ::windows::core::IUnknown { fn from(value: PlaybackRateChangeRequestedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&PlaybackRateChangeRequestedEventArgs> for ::windows::core::IUnknown { fn from(value: &PlaybackRateChangeRequestedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PlaybackRateChangeRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a PlaybackRateChangeRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<PlaybackRateChangeRequestedEventArgs> for ::windows::core::IInspectable { fn from(value: PlaybackRateChangeRequestedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&PlaybackRateChangeRequestedEventArgs> for ::windows::core::IInspectable { fn from(value: &PlaybackRateChangeRequestedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PlaybackRateChangeRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a PlaybackRateChangeRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for PlaybackRateChangeRequestedEventArgs {} unsafe impl ::core::marker::Sync for PlaybackRateChangeRequestedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ShuffleEnabledChangeRequestedEventArgs(pub ::windows::core::IInspectable); impl ShuffleEnabledChangeRequestedEventArgs { pub fn RequestedShuffleEnabled(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } } unsafe impl ::windows::core::RuntimeType for ShuffleEnabledChangeRequestedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.ShuffleEnabledChangeRequestedEventArgs;{49b593fe-4fd0-4666-a314-c0e01940d302})"); } unsafe impl ::windows::core::Interface for ShuffleEnabledChangeRequestedEventArgs { type Vtable = IShuffleEnabledChangeRequestedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x49b593fe_4fd0_4666_a314_c0e01940d302); } impl ::windows::core::RuntimeName for ShuffleEnabledChangeRequestedEventArgs { const NAME: &'static str = "Windows.Media.ShuffleEnabledChangeRequestedEventArgs"; } impl ::core::convert::From<ShuffleEnabledChangeRequestedEventArgs> for ::windows::core::IUnknown { fn from(value: ShuffleEnabledChangeRequestedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&ShuffleEnabledChangeRequestedEventArgs> for ::windows::core::IUnknown { fn from(value: &ShuffleEnabledChangeRequestedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ShuffleEnabledChangeRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ShuffleEnabledChangeRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ShuffleEnabledChangeRequestedEventArgs> for ::windows::core::IInspectable { fn from(value: ShuffleEnabledChangeRequestedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&ShuffleEnabledChangeRequestedEventArgs> for ::windows::core::IInspectable { fn from(value: &ShuffleEnabledChangeRequestedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ShuffleEnabledChangeRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a ShuffleEnabledChangeRequestedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for ShuffleEnabledChangeRequestedEventArgs {} unsafe impl ::core::marker::Sync for ShuffleEnabledChangeRequestedEventArgs {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct SoundLevel(pub i32); impl SoundLevel { pub const Muted: SoundLevel = SoundLevel(0i32); pub const Low: SoundLevel = SoundLevel(1i32); pub const Full: SoundLevel = SoundLevel(2i32); } impl ::core::convert::From<i32> for SoundLevel { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for SoundLevel { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for SoundLevel { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.SoundLevel;i4)"); } impl ::windows::core::DefaultType for SoundLevel { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SystemMediaTransportControls(pub ::windows::core::IInspectable); impl SystemMediaTransportControls { pub fn PlaybackStatus(&self) -> ::windows::core::Result<MediaPlaybackStatus> { let this = self; unsafe { let mut result__: MediaPlaybackStatus = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackStatus>(result__) } } pub fn SetPlaybackStatus(&self, value: MediaPlaybackStatus) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn DisplayUpdater(&self) -> ::windows::core::Result<SystemMediaTransportControlsDisplayUpdater> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<SystemMediaTransportControlsDisplayUpdater>(result__) } } pub fn SoundLevel(&self) -> ::windows::core::Result<SoundLevel> { let this = self; unsafe { let mut result__: SoundLevel = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<SoundLevel>(result__) } } pub fn IsEnabled(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsPlayEnabled(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsPlayEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsStopEnabled(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsStopEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsPauseEnabled(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsPauseEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsRecordEnabled(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsRecordEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsFastForwardEnabled(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsFastForwardEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsRewindEnabled(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsRewindEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsPreviousEnabled(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsPreviousEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsNextEnabled(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsNextEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsChannelUpEnabled(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsChannelUpEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsChannelDownEnabled(&self) -> ::windows::core::Result<bool> { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).30)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetIsChannelDownEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).31)(::core::mem::transmute_copy(this), value).ok() } } #[cfg(feature = "Foundation")] pub fn ButtonPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::TypedEventHandler<SystemMediaTransportControls, SystemMediaTransportControlsButtonPressedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { let this = self; unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).32)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveButtonPressed<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).33)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn PropertyChanged<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::TypedEventHandler<SystemMediaTransportControls, SystemMediaTransportControlsPropertyChangedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { let this = self; unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).34)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemovePropertyChanged<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).35)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } pub fn AutoRepeatMode(&self) -> ::windows::core::Result<MediaPlaybackAutoRepeatMode> { let this = &::windows::core::Interface::cast::<ISystemMediaTransportControls2>(self)?; unsafe { let mut result__: MediaPlaybackAutoRepeatMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackAutoRepeatMode>(result__) } } pub fn SetAutoRepeatMode(&self, value: MediaPlaybackAutoRepeatMode) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ISystemMediaTransportControls2>(self)?; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn ShuffleEnabled(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<ISystemMediaTransportControls2>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } pub fn SetShuffleEnabled(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ISystemMediaTransportControls2>(self)?; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn PlaybackRate(&self) -> ::windows::core::Result<f64> { let this = &::windows::core::Interface::cast::<ISystemMediaTransportControls2>(self)?; unsafe { let mut result__: f64 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) } } pub fn SetPlaybackRate(&self, value: f64) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ISystemMediaTransportControls2>(self)?; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn UpdateTimelineProperties<'a, Param0: ::windows::core::IntoParam<'a, SystemMediaTransportControlsTimelineProperties>>(&self, timelineproperties: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ISystemMediaTransportControls2>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), timelineproperties.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn PlaybackPositionChangeRequested<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::TypedEventHandler<SystemMediaTransportControls, PlaybackPositionChangeRequestedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { let this = &::windows::core::Interface::cast::<ISystemMediaTransportControls2>(self)?; unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemovePlaybackPositionChangeRequested<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ISystemMediaTransportControls2>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn PlaybackRateChangeRequested<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::TypedEventHandler<SystemMediaTransportControls, PlaybackRateChangeRequestedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { let this = &::windows::core::Interface::cast::<ISystemMediaTransportControls2>(self)?; unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemovePlaybackRateChangeRequested<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ISystemMediaTransportControls2>(self)?; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn ShuffleEnabledChangeRequested<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::TypedEventHandler<SystemMediaTransportControls, ShuffleEnabledChangeRequestedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { let this = &::windows::core::Interface::cast::<ISystemMediaTransportControls2>(self)?; unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveShuffleEnabledChangeRequested<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ISystemMediaTransportControls2>(self)?; unsafe { (::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn AutoRepeatModeChangeRequested<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::TypedEventHandler<SystemMediaTransportControls, AutoRepeatModeChangeRequestedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::Foundation::EventRegistrationToken> { let this = &::windows::core::Interface::cast::<ISystemMediaTransportControls2>(self)?; unsafe { let mut result__: super::Foundation::EventRegistrationToken = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::Foundation::EventRegistrationToken>(result__) } } #[cfg(feature = "Foundation")] pub fn RemoveAutoRepeatModeChangeRequested<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<ISystemMediaTransportControls2>(self)?; unsafe { (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } pub fn GetForCurrentView() -> ::windows::core::Result<SystemMediaTransportControls> { Self::ISystemMediaTransportControlsStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<SystemMediaTransportControls>(result__) }) } pub fn ISystemMediaTransportControlsStatics<R, F: FnOnce(&ISystemMediaTransportControlsStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<SystemMediaTransportControls, ISystemMediaTransportControlsStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for SystemMediaTransportControls { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.SystemMediaTransportControls;{99fa3ff4-1742-42a6-902e-087d41f965ec})"); } unsafe impl ::windows::core::Interface for SystemMediaTransportControls { type Vtable = ISystemMediaTransportControls_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x99fa3ff4_1742_42a6_902e_087d41f965ec); } impl ::windows::core::RuntimeName for SystemMediaTransportControls { const NAME: &'static str = "Windows.Media.SystemMediaTransportControls"; } impl ::core::convert::From<SystemMediaTransportControls> for ::windows::core::IUnknown { fn from(value: SystemMediaTransportControls) -> Self { value.0 .0 } } impl ::core::convert::From<&SystemMediaTransportControls> for ::windows::core::IUnknown { fn from(value: &SystemMediaTransportControls) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SystemMediaTransportControls { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a SystemMediaTransportControls { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SystemMediaTransportControls> for ::windows::core::IInspectable { fn from(value: SystemMediaTransportControls) -> Self { value.0 } } impl ::core::convert::From<&SystemMediaTransportControls> for ::windows::core::IInspectable { fn from(value: &SystemMediaTransportControls) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SystemMediaTransportControls { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a SystemMediaTransportControls { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for SystemMediaTransportControls {} unsafe impl ::core::marker::Sync for SystemMediaTransportControls {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct SystemMediaTransportControlsButton(pub i32); impl SystemMediaTransportControlsButton { pub const Play: SystemMediaTransportControlsButton = SystemMediaTransportControlsButton(0i32); pub const Pause: SystemMediaTransportControlsButton = SystemMediaTransportControlsButton(1i32); pub const Stop: SystemMediaTransportControlsButton = SystemMediaTransportControlsButton(2i32); pub const Record: SystemMediaTransportControlsButton = SystemMediaTransportControlsButton(3i32); pub const FastForward: SystemMediaTransportControlsButton = SystemMediaTransportControlsButton(4i32); pub const Rewind: SystemMediaTransportControlsButton = SystemMediaTransportControlsButton(5i32); pub const Next: SystemMediaTransportControlsButton = SystemMediaTransportControlsButton(6i32); pub const Previous: SystemMediaTransportControlsButton = SystemMediaTransportControlsButton(7i32); pub const ChannelUp: SystemMediaTransportControlsButton = SystemMediaTransportControlsButton(8i32); pub const ChannelDown: SystemMediaTransportControlsButton = SystemMediaTransportControlsButton(9i32); } impl ::core::convert::From<i32> for SystemMediaTransportControlsButton { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for SystemMediaTransportControlsButton { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for SystemMediaTransportControlsButton { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.SystemMediaTransportControlsButton;i4)"); } impl ::windows::core::DefaultType for SystemMediaTransportControlsButton { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SystemMediaTransportControlsButtonPressedEventArgs(pub ::windows::core::IInspectable); impl SystemMediaTransportControlsButtonPressedEventArgs { pub fn Button(&self) -> ::windows::core::Result<SystemMediaTransportControlsButton> { let this = self; unsafe { let mut result__: SystemMediaTransportControlsButton = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<SystemMediaTransportControlsButton>(result__) } } } unsafe impl ::windows::core::RuntimeType for SystemMediaTransportControlsButtonPressedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.SystemMediaTransportControlsButtonPressedEventArgs;{b7f47116-a56f-4dc8-9e11-92031f4a87c2})"); } unsafe impl ::windows::core::Interface for SystemMediaTransportControlsButtonPressedEventArgs { type Vtable = ISystemMediaTransportControlsButtonPressedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb7f47116_a56f_4dc8_9e11_92031f4a87c2); } impl ::windows::core::RuntimeName for SystemMediaTransportControlsButtonPressedEventArgs { const NAME: &'static str = "Windows.Media.SystemMediaTransportControlsButtonPressedEventArgs"; } impl ::core::convert::From<SystemMediaTransportControlsButtonPressedEventArgs> for ::windows::core::IUnknown { fn from(value: SystemMediaTransportControlsButtonPressedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&SystemMediaTransportControlsButtonPressedEventArgs> for ::windows::core::IUnknown { fn from(value: &SystemMediaTransportControlsButtonPressedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SystemMediaTransportControlsButtonPressedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a SystemMediaTransportControlsButtonPressedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SystemMediaTransportControlsButtonPressedEventArgs> for ::windows::core::IInspectable { fn from(value: SystemMediaTransportControlsButtonPressedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&SystemMediaTransportControlsButtonPressedEventArgs> for ::windows::core::IInspectable { fn from(value: &SystemMediaTransportControlsButtonPressedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SystemMediaTransportControlsButtonPressedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a SystemMediaTransportControlsButtonPressedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for SystemMediaTransportControlsButtonPressedEventArgs {} unsafe impl ::core::marker::Sync for SystemMediaTransportControlsButtonPressedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SystemMediaTransportControlsDisplayUpdater(pub ::windows::core::IInspectable); impl SystemMediaTransportControlsDisplayUpdater { pub fn Type(&self) -> ::windows::core::Result<MediaPlaybackType> { let this = self; unsafe { let mut result__: MediaPlaybackType = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackType>(result__) } } pub fn SetType(&self, value: MediaPlaybackType) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn AppMediaId(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetAppMediaId<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Storage_Streams")] pub fn Thumbnail(&self) -> ::windows::core::Result<super::Storage::Streams::RandomAccessStreamReference> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Storage::Streams::RandomAccessStreamReference>(result__) } } #[cfg(feature = "Storage_Streams")] pub fn SetThumbnail<'a, Param0: ::windows::core::IntoParam<'a, super::Storage::Streams::RandomAccessStreamReference>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn MusicProperties(&self) -> ::windows::core::Result<MusicDisplayProperties> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MusicDisplayProperties>(result__) } } pub fn VideoProperties(&self) -> ::windows::core::Result<VideoDisplayProperties> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<VideoDisplayProperties>(result__) } } pub fn ImageProperties(&self) -> ::windows::core::Result<ImageDisplayProperties> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<ImageDisplayProperties>(result__) } } #[cfg(all(feature = "Foundation", feature = "Storage"))] pub fn CopyFromFileAsync<'a, Param1: ::windows::core::IntoParam<'a, super::Storage::StorageFile>>(&self, r#type: MediaPlaybackType, source: Param1) -> ::windows::core::Result<super::Foundation::IAsyncOperation<bool>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), r#type, source.into_param().abi(), &mut result__).from_abi::<super::Foundation::IAsyncOperation<bool>>(result__) } } pub fn ClearAll(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this)).ok() } } pub fn Update(&self) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this)).ok() } } } unsafe impl ::windows::core::RuntimeType for SystemMediaTransportControlsDisplayUpdater { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.SystemMediaTransportControlsDisplayUpdater;{8abbc53e-fa55-4ecf-ad8e-c984e5dd1550})"); } unsafe impl ::windows::core::Interface for SystemMediaTransportControlsDisplayUpdater { type Vtable = ISystemMediaTransportControlsDisplayUpdater_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8abbc53e_fa55_4ecf_ad8e_c984e5dd1550); } impl ::windows::core::RuntimeName for SystemMediaTransportControlsDisplayUpdater { const NAME: &'static str = "Windows.Media.SystemMediaTransportControlsDisplayUpdater"; } impl ::core::convert::From<SystemMediaTransportControlsDisplayUpdater> for ::windows::core::IUnknown { fn from(value: SystemMediaTransportControlsDisplayUpdater) -> Self { value.0 .0 } } impl ::core::convert::From<&SystemMediaTransportControlsDisplayUpdater> for ::windows::core::IUnknown { fn from(value: &SystemMediaTransportControlsDisplayUpdater) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SystemMediaTransportControlsDisplayUpdater { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a SystemMediaTransportControlsDisplayUpdater { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SystemMediaTransportControlsDisplayUpdater> for ::windows::core::IInspectable { fn from(value: SystemMediaTransportControlsDisplayUpdater) -> Self { value.0 } } impl ::core::convert::From<&SystemMediaTransportControlsDisplayUpdater> for ::windows::core::IInspectable { fn from(value: &SystemMediaTransportControlsDisplayUpdater) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SystemMediaTransportControlsDisplayUpdater { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a SystemMediaTransportControlsDisplayUpdater { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for SystemMediaTransportControlsDisplayUpdater {} unsafe impl ::core::marker::Sync for SystemMediaTransportControlsDisplayUpdater {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct SystemMediaTransportControlsProperty(pub i32); impl SystemMediaTransportControlsProperty { pub const SoundLevel: SystemMediaTransportControlsProperty = SystemMediaTransportControlsProperty(0i32); } impl ::core::convert::From<i32> for SystemMediaTransportControlsProperty { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for SystemMediaTransportControlsProperty { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for SystemMediaTransportControlsProperty { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.SystemMediaTransportControlsProperty;i4)"); } impl ::windows::core::DefaultType for SystemMediaTransportControlsProperty { type DefaultType = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SystemMediaTransportControlsPropertyChangedEventArgs(pub ::windows::core::IInspectable); impl SystemMediaTransportControlsPropertyChangedEventArgs { pub fn Property(&self) -> ::windows::core::Result<SystemMediaTransportControlsProperty> { let this = self; unsafe { let mut result__: SystemMediaTransportControlsProperty = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<SystemMediaTransportControlsProperty>(result__) } } } unsafe impl ::windows::core::RuntimeType for SystemMediaTransportControlsPropertyChangedEventArgs { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.SystemMediaTransportControlsPropertyChangedEventArgs;{d0ca0936-339b-4cb3-8eeb-737607f56e08})"); } unsafe impl ::windows::core::Interface for SystemMediaTransportControlsPropertyChangedEventArgs { type Vtable = ISystemMediaTransportControlsPropertyChangedEventArgs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd0ca0936_339b_4cb3_8eeb_737607f56e08); } impl ::windows::core::RuntimeName for SystemMediaTransportControlsPropertyChangedEventArgs { const NAME: &'static str = "Windows.Media.SystemMediaTransportControlsPropertyChangedEventArgs"; } impl ::core::convert::From<SystemMediaTransportControlsPropertyChangedEventArgs> for ::windows::core::IUnknown { fn from(value: SystemMediaTransportControlsPropertyChangedEventArgs) -> Self { value.0 .0 } } impl ::core::convert::From<&SystemMediaTransportControlsPropertyChangedEventArgs> for ::windows::core::IUnknown { fn from(value: &SystemMediaTransportControlsPropertyChangedEventArgs) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SystemMediaTransportControlsPropertyChangedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a SystemMediaTransportControlsPropertyChangedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SystemMediaTransportControlsPropertyChangedEventArgs> for ::windows::core::IInspectable { fn from(value: SystemMediaTransportControlsPropertyChangedEventArgs) -> Self { value.0 } } impl ::core::convert::From<&SystemMediaTransportControlsPropertyChangedEventArgs> for ::windows::core::IInspectable { fn from(value: &SystemMediaTransportControlsPropertyChangedEventArgs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SystemMediaTransportControlsPropertyChangedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a SystemMediaTransportControlsPropertyChangedEventArgs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for SystemMediaTransportControlsPropertyChangedEventArgs {} unsafe impl ::core::marker::Sync for SystemMediaTransportControlsPropertyChangedEventArgs {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SystemMediaTransportControlsTimelineProperties(pub ::windows::core::IInspectable); impl SystemMediaTransportControlsTimelineProperties { pub fn new() -> ::windows::core::Result<Self> { Self::IActivationFactory(|f| f.activate_instance::<Self>()) } fn IActivationFactory<R, F: FnOnce(&::windows::core::IActivationFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<SystemMediaTransportControlsTimelineProperties, ::windows::core::IActivationFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } #[cfg(feature = "Foundation")] pub fn StartTime(&self) -> ::windows::core::Result<super::Foundation::TimeSpan> { let this = self; unsafe { let mut result__: super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetStartTime<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn EndTime(&self) -> ::windows::core::Result<super::Foundation::TimeSpan> { let this = self; unsafe { let mut result__: super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetEndTime<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn MinSeekTime(&self) -> ::windows::core::Result<super::Foundation::TimeSpan> { let this = self; unsafe { let mut result__: super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetMinSeekTime<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn MaxSeekTime(&self) -> ::windows::core::Result<super::Foundation::TimeSpan> { let this = self; unsafe { let mut result__: super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetMaxSeekTime<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Position(&self) -> ::windows::core::Result<super::Foundation::TimeSpan> { let this = self; unsafe { let mut result__: super::Foundation::TimeSpan = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::TimeSpan>(result__) } } #[cfg(feature = "Foundation")] pub fn SetPosition<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } } unsafe impl ::windows::core::RuntimeType for SystemMediaTransportControlsTimelineProperties { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.SystemMediaTransportControlsTimelineProperties;{5125316a-c3a2-475b-8507-93534dc88f15})"); } unsafe impl ::windows::core::Interface for SystemMediaTransportControlsTimelineProperties { type Vtable = ISystemMediaTransportControlsTimelineProperties_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5125316a_c3a2_475b_8507_93534dc88f15); } impl ::windows::core::RuntimeName for SystemMediaTransportControlsTimelineProperties { const NAME: &'static str = "Windows.Media.SystemMediaTransportControlsTimelineProperties"; } impl ::core::convert::From<SystemMediaTransportControlsTimelineProperties> for ::windows::core::IUnknown { fn from(value: SystemMediaTransportControlsTimelineProperties) -> Self { value.0 .0 } } impl ::core::convert::From<&SystemMediaTransportControlsTimelineProperties> for ::windows::core::IUnknown { fn from(value: &SystemMediaTransportControlsTimelineProperties) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SystemMediaTransportControlsTimelineProperties { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a SystemMediaTransportControlsTimelineProperties { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SystemMediaTransportControlsTimelineProperties> for ::windows::core::IInspectable { fn from(value: SystemMediaTransportControlsTimelineProperties) -> Self { value.0 } } impl ::core::convert::From<&SystemMediaTransportControlsTimelineProperties> for ::windows::core::IInspectable { fn from(value: &SystemMediaTransportControlsTimelineProperties) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SystemMediaTransportControlsTimelineProperties { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a SystemMediaTransportControlsTimelineProperties { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for SystemMediaTransportControlsTimelineProperties {} unsafe impl ::core::marker::Sync for SystemMediaTransportControlsTimelineProperties {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct VideoDisplayProperties(pub ::windows::core::IInspectable); impl VideoDisplayProperties { pub fn Title(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetTitle<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } pub fn Subtitle(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn SetSubtitle<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation_Collections")] pub fn Genres(&self) -> ::windows::core::Result<super::Foundation::Collections::IVector<::windows::core::HSTRING>> { let this = &::windows::core::Interface::cast::<IVideoDisplayProperties2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::Collections::IVector<::windows::core::HSTRING>>(result__) } } } unsafe impl ::windows::core::RuntimeType for VideoDisplayProperties { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.VideoDisplayProperties;{5609fdb1-5d2d-4872-8170-45dee5bc2f5c})"); } unsafe impl ::windows::core::Interface for VideoDisplayProperties { type Vtable = IVideoDisplayProperties_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5609fdb1_5d2d_4872_8170_45dee5bc2f5c); } impl ::windows::core::RuntimeName for VideoDisplayProperties { const NAME: &'static str = "Windows.Media.VideoDisplayProperties"; } impl ::core::convert::From<VideoDisplayProperties> for ::windows::core::IUnknown { fn from(value: VideoDisplayProperties) -> Self { value.0 .0 } } impl ::core::convert::From<&VideoDisplayProperties> for ::windows::core::IUnknown { fn from(value: &VideoDisplayProperties) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for VideoDisplayProperties { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a VideoDisplayProperties { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<VideoDisplayProperties> for ::windows::core::IInspectable { fn from(value: VideoDisplayProperties) -> Self { value.0 } } impl ::core::convert::From<&VideoDisplayProperties> for ::windows::core::IInspectable { fn from(value: &VideoDisplayProperties) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for VideoDisplayProperties { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a VideoDisplayProperties { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for VideoDisplayProperties {} unsafe impl ::core::marker::Sync for VideoDisplayProperties {} pub struct VideoEffects {} impl VideoEffects { pub fn VideoStabilization() -> ::windows::core::Result<::windows::core::HSTRING> { Self::IVideoEffectsStatics(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } pub fn IVideoEffectsStatics<R, F: FnOnce(&IVideoEffectsStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<VideoEffects, IVideoEffectsStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } impl ::windows::core::RuntimeName for VideoEffects { const NAME: &'static str = "Windows.Media.VideoEffects"; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct VideoFrame(pub ::windows::core::IInspectable); impl VideoFrame { #[cfg(feature = "Graphics_Imaging")] pub fn SoftwareBitmap(&self) -> ::windows::core::Result<super::Graphics::Imaging::SoftwareBitmap> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Graphics::Imaging::SoftwareBitmap>(result__) } } #[cfg(feature = "Foundation")] pub fn CopyToAsync<'a, Param0: ::windows::core::IntoParam<'a, VideoFrame>>(&self, frame: Param0) -> ::windows::core::Result<super::Foundation::IAsyncAction> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), frame.into_param().abi(), &mut result__).from_abi::<super::Foundation::IAsyncAction>(result__) } } #[cfg(feature = "Graphics_DirectX_Direct3D11")] pub fn Direct3DSurface(&self) -> ::windows::core::Result<super::Graphics::DirectX::Direct3D11::IDirect3DSurface> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Graphics::DirectX::Direct3D11::IDirect3DSurface>(result__) } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn Type(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn IsReadOnly(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation")] pub fn SetRelativeTime<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::IReference<super::Foundation::TimeSpan>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn RelativeTime(&self) -> ::windows::core::Result<super::Foundation::IReference<super::Foundation::TimeSpan>> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::IReference<super::Foundation::TimeSpan>>(result__) } } #[cfg(feature = "Foundation")] pub fn SetSystemRelativeTime<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::IReference<super::Foundation::TimeSpan>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn SystemRelativeTime(&self) -> ::windows::core::Result<super::Foundation::IReference<super::Foundation::TimeSpan>> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::IReference<super::Foundation::TimeSpan>>(result__) } } #[cfg(feature = "Foundation")] pub fn SetDuration<'a, Param0: ::windows::core::IntoParam<'a, super::Foundation::IReference<super::Foundation::TimeSpan>>>(&self, value: Param0) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() } } #[cfg(feature = "Foundation")] pub fn Duration(&self) -> ::windows::core::Result<super::Foundation::IReference<super::Foundation::TimeSpan>> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::IReference<super::Foundation::TimeSpan>>(result__) } } pub fn SetIsDiscontinuous(&self, value: bool) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), value).ok() } } pub fn IsDiscontinuous(&self) -> ::windows::core::Result<bool> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { let mut result__: bool = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn ExtendedProperties(&self) -> ::windows::core::Result<super::Foundation::Collections::IPropertySet> { let this = &::windows::core::Interface::cast::<IMediaFrame>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Foundation::Collections::IPropertySet>(result__) } } #[cfg(feature = "Graphics_Imaging")] pub fn Create(format: super::Graphics::Imaging::BitmapPixelFormat, width: i32, height: i32) -> ::windows::core::Result<VideoFrame> { Self::IVideoFrameFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), format, width, height, &mut result__).from_abi::<VideoFrame>(result__) }) } #[cfg(feature = "Graphics_Imaging")] pub fn CreateWithAlpha(format: super::Graphics::Imaging::BitmapPixelFormat, width: i32, height: i32, alpha: super::Graphics::Imaging::BitmapAlphaMode) -> ::windows::core::Result<VideoFrame> { Self::IVideoFrameFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), format, width, height, alpha, &mut result__).from_abi::<VideoFrame>(result__) }) } #[cfg(all(feature = "Foundation", feature = "Graphics_Imaging"))] pub fn CopyToWithBoundsAsync<'a, Param0: ::windows::core::IntoParam<'a, VideoFrame>, Param1: ::windows::core::IntoParam<'a, super::Foundation::IReference<super::Graphics::Imaging::BitmapBounds>>, Param2: ::windows::core::IntoParam<'a, super::Foundation::IReference<super::Graphics::Imaging::BitmapBounds>>>(&self, frame: Param0, sourcebounds: Param1, destinationbounds: Param2) -> ::windows::core::Result<super::Foundation::IAsyncAction> { let this = &::windows::core::Interface::cast::<IVideoFrame2>(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), frame.into_param().abi(), sourcebounds.into_param().abi(), destinationbounds.into_param().abi(), &mut result__).from_abi::<super::Foundation::IAsyncAction>(result__) } } #[cfg(feature = "Graphics_DirectX")] pub fn CreateAsDirect3D11SurfaceBacked(format: super::Graphics::DirectX::DirectXPixelFormat, width: i32, height: i32) -> ::windows::core::Result<VideoFrame> { Self::IVideoFrameStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), format, width, height, &mut result__).from_abi::<VideoFrame>(result__) }) } #[cfg(all(feature = "Graphics_DirectX", feature = "Graphics_DirectX_Direct3D11"))] pub fn CreateAsDirect3D11SurfaceBackedWithDevice<'a, Param3: ::windows::core::IntoParam<'a, super::Graphics::DirectX::Direct3D11::IDirect3DDevice>>(format: super::Graphics::DirectX::DirectXPixelFormat, width: i32, height: i32, device: Param3) -> ::windows::core::Result<VideoFrame> { Self::IVideoFrameStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), format, width, height, device.into_param().abi(), &mut result__).from_abi::<VideoFrame>(result__) }) } #[cfg(feature = "Graphics_Imaging")] pub fn CreateWithSoftwareBitmap<'a, Param0: ::windows::core::IntoParam<'a, super::Graphics::Imaging::SoftwareBitmap>>(bitmap: Param0) -> ::windows::core::Result<VideoFrame> { Self::IVideoFrameStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), bitmap.into_param().abi(), &mut result__).from_abi::<VideoFrame>(result__) }) } #[cfg(feature = "Graphics_DirectX_Direct3D11")] pub fn CreateWithDirect3D11Surface<'a, Param0: ::windows::core::IntoParam<'a, super::Graphics::DirectX::Direct3D11::IDirect3DSurface>>(surface: Param0) -> ::windows::core::Result<VideoFrame> { Self::IVideoFrameStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), surface.into_param().abi(), &mut result__).from_abi::<VideoFrame>(result__) }) } pub fn IVideoFrameFactory<R, F: FnOnce(&IVideoFrameFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<VideoFrame, IVideoFrameFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } pub fn IVideoFrameStatics<R, F: FnOnce(&IVideoFrameStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<VideoFrame, IVideoFrameStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for VideoFrame { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.VideoFrame;{0cc06625-90fc-4c92-bd95-7ded21819d1c})"); } unsafe impl ::windows::core::Interface for VideoFrame { type Vtable = IVideoFrame_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0cc06625_90fc_4c92_bd95_7ded21819d1c); } impl ::windows::core::RuntimeName for VideoFrame { const NAME: &'static str = "Windows.Media.VideoFrame"; } impl ::core::convert::From<VideoFrame> for ::windows::core::IUnknown { fn from(value: VideoFrame) -> Self { value.0 .0 } } impl ::core::convert::From<&VideoFrame> for ::windows::core::IUnknown { fn from(value: &VideoFrame) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for VideoFrame { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a VideoFrame { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<VideoFrame> for ::windows::core::IInspectable { fn from(value: VideoFrame) -> Self { value.0 } } impl ::core::convert::From<&VideoFrame> for ::windows::core::IInspectable { fn from(value: &VideoFrame) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for VideoFrame { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a VideoFrame { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<VideoFrame> for super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: VideoFrame) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&VideoFrame> for super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &VideoFrame) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::Foundation::IClosable> for VideoFrame { fn into_param(self) -> ::windows::core::Param<'a, super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::Foundation::IClosable> for &VideoFrame { fn into_param(self) -> ::windows::core::Param<'a, super::Foundation::IClosable> { ::core::convert::TryInto::<super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } impl ::core::convert::TryFrom<VideoFrame> for IMediaFrame { type Error = ::windows::core::Error; fn try_from(value: VideoFrame) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } impl ::core::convert::TryFrom<&VideoFrame> for IMediaFrame { type Error = ::windows::core::Error; fn try_from(value: &VideoFrame) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } impl<'a> ::windows::core::IntoParam<'a, IMediaFrame> for VideoFrame { fn into_param(self) -> ::windows::core::Param<'a, IMediaFrame> { ::windows::core::IntoParam::into_param(&self) } } impl<'a> ::windows::core::IntoParam<'a, IMediaFrame> for &VideoFrame { fn into_param(self) -> ::windows::core::Param<'a, IMediaFrame> { ::core::convert::TryInto::<IMediaFrame>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } unsafe impl ::core::marker::Send for VideoFrame {} unsafe impl ::core::marker::Sync for VideoFrame {}
use std; use std::ops::Mul; use cgmath::{BaseFloat, Basis2, Matrix, Matrix3, Quaternion, SquareMatrix, Zero}; use super::{Material, Volume}; /// Mass /// /// Mass properties for a body. Inertia is the moment of inertia in the base pose. For retrieving /// the inertia tensor for the body in its current orientation, see `world_inertia` and /// `world_inverse_inertia`. /// /// ### Type parameters: /// /// - `I`: Inertia type, usually `Scalar` or `Matrix3`, see `Inertia` for more information. #[derive(Debug, Clone)] #[cfg_attr(feature = "serializable", derive(Serialize, Deserialize))] pub struct Mass<S, I> { mass: S, inverse_mass: S, inertia: I, inverse_inertia: I, } /// Moment of inertia, used for abstracting over 2D/3D inertia tensors pub trait Inertia: Mul<Self, Output = Self> + Copy { /// Orientation type for rotating the inertia to create a world space inertia tensor type Orientation; /// Return the infinite inertia fn infinite() -> Self; /// Compute the inverse of the inertia fn invert(&self) -> Self; /// Compute the inertia tensor in the bodies given orientation fn tensor(&self, orientation: &Self::Orientation) -> Self; } impl Inertia for f32 { type Orientation = Basis2<f32>; fn infinite() -> Self { std::f32::INFINITY } fn invert(&self) -> Self { if *self == 0. || self.is_infinite() { 0. } else { 1. / *self } } fn tensor(&self, _: &Basis2<f32>) -> Self { *self } } impl Inertia for f64 { type Orientation = Basis2<f64>; fn invert(&self) -> Self { if *self == 0. || self.is_infinite() { 0. } else { 1. / *self } } fn tensor(&self, _: &Basis2<f64>) -> Self { *self } fn infinite() -> Self { std::f64::INFINITY } } impl<S> Inertia for Matrix3<S> where S: BaseFloat, { type Orientation = Quaternion<S>; fn invert(&self) -> Self { if self.x.x.is_infinite() { Matrix3::zero() } else { SquareMatrix::invert(self).unwrap_or_else(Matrix3::zero) } } fn tensor(&self, orientation: &Quaternion<S>) -> Self { let mat3 = Matrix3::from(*orientation); mat3 * (*self * mat3.transpose()) } fn infinite() -> Self { Matrix3::from_value(S::infinity()) } } impl<S, I> Mass<S, I> where S: BaseFloat, I: Inertia, { /// Create new mass object pub fn new(mass: S) -> Self { Self::new_with_inertia(mass, I::infinite()) } /// Create new infinite mass object pub fn infinite() -> Self { Self::new_with_inertia(S::infinity(), I::infinite()) } /// Create new mass object with given inertia pub fn new_with_inertia(mass: S, inertia: I) -> Self { let inverse_mass = if mass.is_infinite() { S::zero() } else { S::one() / mass }; let inverse_inertia = inertia.invert(); Mass { mass, inverse_mass, inertia, inverse_inertia, } } /// Compute mass from the given volume shape and material pub fn from_volume_and_material<V>(volume: &V, material: &Material) -> Self where V: Volume<S, I>, { volume.get_mass(material) } /// Get mass pub fn mass(&self) -> S { self.mass } /// Get inverse mass pub fn inverse_mass(&self) -> S { self.inverse_mass } /// Get inertia in local space pub fn local_inertia(&self) -> I { self.inertia } /// Get inertia tensor in world space /// /// ### Parameters: /// /// - `orientation`: The current orientation of the body pub fn world_inertia(&self, orientation: &I::Orientation) -> I { self.inertia.tensor(orientation) } /// Get inverse inertia in local space pub fn local_inverse_inertia(&self) -> I { self.inverse_inertia } /// Get inverse inertia tensor in world space /// /// ### Parameters: /// /// - `orientation`: The current orientation of the body pub fn world_inverse_inertia(&self, orientation: &I::Orientation) -> I { self.inverse_inertia.tensor(orientation) } }
//! Fields which are common to all segment-section and gate descriptors use shared::PrivilegeLevel; use shared::segmentation; /// System-Segment and Gate-Descriptor Types for IA32e mode. When the `S` /// (descriptor type) flag in a segment descriptor is clear, the descriptor type /// is a system descriptor. /// /// See Intel manual 3a, 3.5 "System Descriptor Types", and Table 3-2, /// System-Segment and Gate-Descriptor Types". #[repr(u8)] pub enum SystemType { // Reserved = 0 TssAvailable = 1, /// Only for 16-bit LocalDescriptorTable = 2, TssBusy = 3, CallGate = 4, /// Only for 16-bit TaskGate = 5, InterruptGate = 6, TrapGate = 7, } /// A high-level representation of a descriptor type. One can convert to and /// from the `Flags` bitfield to encode/decode an actual descriptor. #[repr(u8)] pub enum Type { SystemDescriptor { /// false/0: 16-bit /// true/1: native (32- or 64-bit) size: bool, ty: SystemType }, SegmentDescriptor { ty: segmentation::Type, accessed: bool } } impl Type { pub fn pack(self) -> u8 { match self { Type::SystemDescriptor { size, ty } => (size as u8) << 3 | (ty as u8) | FLAGS_TYPE_SYS.bits, Type::SegmentDescriptor { ty, accessed } => (accessed as u8) | ty.pack() | FLAGS_TYPE_SEG.bits, } } } bitflags!{ /// Actual encoding of the flags in byte 6 common to all descriptors. /// /// See Intel manual 3a, figures 3-8, 6-2, and 6-7. pub flags Flags: u8 { /// Descriptor is Present. const FLAGS_PRESENT = 1 << 7, // Descriptor privilege level const FLAGS_DPL_RING_0 = 0b00 << 5, const FLAGS_DPL_RING_1 = 0b01 << 5, const FLAGS_DPL_RING_2 = 0b10 << 5, const FLAGS_DPL_RING_3 = 0b11 << 5, // Is system descriptor const FLAGS_TYPE_SYS = 0 << 4, const FLAGS_TYPE_SEG = 1 << 4, // System-Segment and Gate-Descriptor Types. // When the S (descriptor type) flag in a segment descriptor is clear, // the descriptor type is a system descriptor // All modes (supporting segments) const TYPE_SYS_LDT = 0b0_0010, // Protected Mode and older const FLAGS_TYPE_SYS_16BIT_TSS_AVAILABLE = 0b0_0001, const FLAGS_TYPE_SYS_16BIT_TSS_BUSY = 0b0_0011, const FLAGS_TYPE_SYS_16BIT_CALL_GATE = 0b0_0100, const FLAGS_TYPE_SYS_16BIT_TASK_GATE = 0b0_0101, const FLAGS_TYPE_SYS_16BIT_INTERRUPT_GATE = 0b0_0110, const FLAGS_TYPE_SYS_16BIT_TRAP_GATE = 0b0_0111, // 64-bit in IA-32e Mode (either submode), 32-bit in Protected Mode const FLAGS_TYPE_SYS_NATIVE_TSS_AVAILABLE = 0b0_1001, const FLAGS_TYPE_SYS_NATIVE_TSS_BUSY = 0b0_1011, const FLAGS_TYPE_SYS_NATIVE_CALL_GATE = 0b0_1100, const FLAGS_TYPE_SYS_NATIVE_INTERRUPT_GATE = 0b0_1110, const FLAGS_TYPE_SYS_NATIVE_TRAP_GATE = 0b0_1111, // Code- and Data-Segment Descriptor Types. // When the S (descriptor type) flag in a segment descriptor is set, // the descriptor is for either a code or a data segment. /// Data or code, accessed const FLAGS_TYPE_SEG_ACCESSED = 0b1_0001, const FLAGS_TYPE_DATA = 0b1_0000, const FLAGS_TYPE_CODE = 0b1_1000, // Data => permissions const FLAGS_TYPE_SEG_D_WRITE = 0b1_0010, const FLAGS_TYPE_SEG_D_EXPAND_DOWN = 0b1_0100, // Code => permissions const FLAGS_TYPE_SEG_C_READ = 0b1_0010, const FLAGS_TYPE_SEG_C_CONFORMING = 0b1_0100, /// Data Read-Only const FLAGS_TYPE_SEG_D_RO = FLAGS_TYPE_DATA.bits, /// Data Read-Only, accessed const FLAGS_TYPE_SEG_D_ROA = FLAGS_TYPE_DATA.bits | FLAGS_TYPE_SEG_ACCESSED.bits, /// Data Read/Write const FLAGS_TYPE_SEG_D_RW = FLAGS_TYPE_DATA.bits | FLAGS_TYPE_SEG_D_WRITE.bits, /// Data Read/Write, accessed const FLAGS_TYPE_SEG_D_RWA = FLAGS_TYPE_DATA.bits | FLAGS_TYPE_SEG_D_WRITE.bits | FLAGS_TYPE_SEG_ACCESSED.bits, /// Data Read-Only, expand-down const FLAGS_TYPE_SEG_D_ROEXD = FLAGS_TYPE_DATA.bits | FLAGS_TYPE_SEG_D_EXPAND_DOWN.bits, /// Data Read-Only, expand-down, accessed const FLAGS_TYPE_SEG_D_ROEXDA = FLAGS_TYPE_DATA.bits | FLAGS_TYPE_SEG_D_EXPAND_DOWN.bits | FLAGS_TYPE_SEG_ACCESSED.bits, /// Data Read/Write, expand-down const FLAGS_TYPE_SEG_D_RWEXD = FLAGS_TYPE_DATA.bits | FLAGS_TYPE_SEG_D_WRITE.bits | FLAGS_TYPE_SEG_D_EXPAND_DOWN.bits, /// Data Read/Write, expand-down, accessed const FLAGS_TYPE_SEG_D_RWEXDA = FLAGS_TYPE_DATA.bits | FLAGS_TYPE_SEG_D_WRITE.bits | FLAGS_TYPE_SEG_D_EXPAND_DOWN.bits | FLAGS_TYPE_SEG_ACCESSED.bits, /// Code Execute-Only const FLAGS_TYPE_SEG_C_EO = FLAGS_TYPE_CODE.bits, /// Code Execute-Only, accessed const FLAGS_TYPE_SEG_C_EOA = FLAGS_TYPE_CODE.bits | FLAGS_TYPE_SEG_ACCESSED.bits, /// Code Execute/Read const FLAGS_TYPE_SEG_C_ER = FLAGS_TYPE_CODE.bits | FLAGS_TYPE_SEG_C_READ.bits, /// Code Execute/Read, accessed const FLAGS_TYPE_SEG_C_ERA = FLAGS_TYPE_CODE.bits | FLAGS_TYPE_SEG_C_READ.bits | FLAGS_TYPE_SEG_ACCESSED.bits, /// Code Execute-Only, conforming const FLAGS_TYPE_SEG_C_EOC = FLAGS_TYPE_CODE.bits | FLAGS_TYPE_SEG_C_CONFORMING.bits, /// Code Execute-Only, conforming, accessed const FLAGS_TYPE_SEG_C_EOCA = FLAGS_TYPE_CODE.bits | FLAGS_TYPE_SEG_C_CONFORMING.bits | FLAGS_TYPE_SEG_ACCESSED.bits, /// Code Execute/Read, conforming const FLAGS_TYPE_SEG_C_ERC = FLAGS_TYPE_CODE.bits | FLAGS_TYPE_SEG_C_READ.bits | FLAGS_TYPE_SEG_C_CONFORMING.bits, /// Code Execute/Read, conforming, accessed const FLAGS_TYPE_SEG_C_ERCA = FLAGS_TYPE_CODE.bits | FLAGS_TYPE_SEG_C_READ.bits | FLAGS_TYPE_SEG_C_CONFORMING.bits | FLAGS_TYPE_SEG_ACCESSED.bits, } } impl Flags { pub const BLANK: Flags = Flags { bits: 0 }; pub const fn from_priv(dpl: PrivilegeLevel) -> Flags { Flags { bits: (dpl as u8) << 5 } } pub fn from_type(ty: Type) -> Flags { Flags { bits: ty.pack() } } pub const fn const_or(self, other: Self) -> Flags { Flags { bits: self.bits | other.bits } } pub const fn cond(self, cond: bool) -> Flags { Flags { bits: (-(cond as i8) as u8) & self.bits } } pub const fn const_mux(self, other: Self, cond: bool) -> Flags { self.cond(cond).const_or(other.cond(!cond)) } }
use std::io; use std::mem; use std::thread; use anyhow::anyhow; use anyhow::Context; use anyhow::Result; use crate::db; use crate::nexus::Doc; use crate::nexus::Event; #[cfg(feature = "crossbeam-channel")] mod channel { pub type Sender = crossbeam_channel::Sender<super::Doc>; pub type Receiver = crossbeam_channel::Receiver<super::Doc>; pub fn new() -> (Sender, Receiver) { crossbeam_channel::bounded(65_536) } } #[cfg(not(feature = "crossbeam-channel"))] mod channel { use std::sync::mpsc; pub type Sender = mpsc::SyncSender<super::Doc>; pub type Receiver = mpsc::Receiver<super::Doc>; pub fn new() -> (Sender, Receiver) { mpsc::sync_channel(65_536) } } pub fn ingest<R: io::BufRead>(from: R, conn: rusqlite::Connection) -> Result<rusqlite::Connection> { let (send, recv) = channel::new(); let writer = thread::spawn(move || write(conn, recv)); let local_error = crate::nexus::read(from, |event| { match event { Event::Doc(d) => send.send(d)?, Event::Error { error, raw } => { Err(error).with_context(|| anyhow!("processing {:?}", raw))? } Event::Delete(_) => (), } Ok(()) }); mem::drop(send); let conn = writer.join().map_err(|e| anyhow!("panic: {:?}", e))??; local_error?; Ok(conn) } fn write(mut conn: rusqlite::Connection, recv: channel::Receiver) -> Result<rusqlite::Connection> { let tran = conn.transaction()?; { let mut db = db::DbBuilder::new(&tran)?; while let Ok(doc) = recv.recv() { db.add(&doc)?; } } tran.commit()?; Ok(conn) }
use proconio::input; use fenwick_tree::FenwickTree; fn main() { input! { n: usize, m: usize, a: [[u32; m]; n], }; let mut values = Vec::new(); for a in &a { for &x in a { values.push(x); } } values.sort(); let ord = |x: u32| -> usize { values.binary_search(&x).unwrap() }; let mut t = FenwickTree::new(n * m + 1, 0); let mut ans = 0_usize; for i in (0..n).rev() { let mut a = a[i].clone(); a.sort(); let mut p = 0; for (j, &x) in a.iter().enumerate() { if i + 1 < n { ans += t.sum(0..ord(x)); } p += j + 1; } ans += p * (n - i - 1); for &x in &a { t.add(ord(x), 1); } } println!("{}", ans); }
//! ffi-safe types that aren't wrappers for other types. pub mod bitarray; mod constructor; mod ignored_wrapper; mod late_static_ref; mod maybe_cmp; mod move_ptr; mod nul_str; mod rmut; mod rref; pub mod rsmallbox; mod static_ref; pub mod version; pub use self::{ bitarray::BitArray64, constructor::{Constructor, ConstructorOrValue}, ignored_wrapper::CmpIgnored, late_static_ref::LateStaticRef, maybe_cmp::MaybeCmp, move_ptr::MovePtr, nul_str::{NulStr, NulStrError}, rmut::RMut, rref::RRef, rsmallbox::RSmallBox, static_ref::StaticRef, version::{ParseVersionError, VersionNumber, VersionStrings}, };
use std::io::{stdin,BufRead}; use clap::{App, Arg, ArgMatches}; struct Cola2 { debug: bool, serialize: bool, ret: u128, p: u128, } impl Cola2 { fn is_on_octet_boundary(&self) -> bool { self.ret % 8 == 0 && self.ret != 0 } //opb is operation A for collats' map fn opa(&mut self, p :u128) -> u128 { if self.serialize { print!("A"); } else if self.debug { print!("{} -> ", p); } self.f(p / 2) } //opb is operation B for collats' map fn opb(&mut self, p :u128) -> u128 { if self.serialize { print!("B"); } else if self.debug { print!("{} -> ", p) } self.f(p * 3 + 1) } fn f (&mut self, p :u128) -> u128 { if p == 0 { panic!("undef"); } if p == 1 { if self.serialize { println!(""); } else if self.debug { println!("1 [len={}]", self.ret); } else { println!("{} {}", self.p, self.ret); } return 0 } if self.is_on_octet_boundary() { if self.serialize { /*if self.ret % 64 == 0 { println!("") }*/ //print!(" "); } } self.ret = self.ret + 1; match p % 2 { 0 => self.opa(p), 1 => self.opb(p), _ => 0, } } pub fn run (p :u128, debug :bool, serialize :bool) { let mut runner = Cola2{ debug: debug, serialize: serialize, ret: 0, p: p, }; runner.f(p); } } fn get_cli_matcher() -> ArgMatches<'static> { App::new("cola2") .version("0.1.0") .author("Nomura Suzume <suzume315@g00.g1e.org>") .arg( Arg::with_name("encode") .short("E") .help("encode output with CPD format") .required(false) ) .arg( Arg::with_name("debug") .short("d") .help("show verbose output") .takes_value(false) .required(false) ) .arg( Arg::with_name("split") .short("s") .value_name("NUM") .takes_value(true) .help("split serialized octet with newline for specified blocks") .required(false) ) .get_matches() } fn main() { let app = get_cli_matcher(); let stdin = stdin(); let reader = stdin.lock(); for line in reader.lines() { let line = line.unwrap(); let mut numbers = line.split_whitespace().collect::<Vec<_>>(); while let Some(n) = numbers.pop() { if let Ok(n) = n.parse::<u128>() { Cola2::run(n, app.is_present("debug"), app.is_present("encode")); } } } }
extern crate rush; use rush::{get_line, run_command}; pub fn main() { while let Some(line) = get_line("$ ") { run_command(line); } }
extern crate chrono; extern crate hex; use self::hex::ToHex; use chrono::Utc; use serde::{Deserialize, Serialize}; use serde_json::{json, Value}; use sha3::{Digest, Sha3_256}; const COST: usize = 4; #[derive(Debug, Clone, Deserialize, Serialize)] pub struct DataPoint { pub from: String, pub to: String, pub amount: f64, } impl DataPoint { pub fn new(from: String, to: String, amount: f64) -> DataPoint { DataPoint { from, to, amount } } pub fn get(&self) -> Value { json!({ "from": self.from, "to": self.to, "amount": self.amount, }) } pub fn to_string(&self) -> String { self.get().to_string() } } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Block { pub summary: String, pub data: Vec<DataPoint>, pub previous_summary: String, pub nonce: u64, pub timestamp: i64, pub genesis: bool, } fn hash(data: &String) -> String { let mut hasher = Sha3_256::new(); hasher.update(data); hasher.finalize().as_slice().encode_hex() } fn hash_with_cost(data: String) -> (String, u64) { let mut h = "".to_string(); let mut nonce = 0; while !h.starts_with(&"0".repeat(COST)) { nonce += 1; h = hash(&(data.to_string() + &nonce.to_string())); } (h, nonce) } fn data_to_string(data: &Vec<DataPoint>) -> String { let mut tobe_hashed = "".to_string(); for d in data { tobe_hashed += &(d.from.clone() + &d.to + d.amount.to_string().as_str()); } tobe_hashed } impl Block { pub fn new(data: Vec<DataPoint>, previous_hash: String) -> Block { let tobe_hashed = data_to_string(&data); let (summary, nonce) = hash_with_cost(tobe_hashed + &previous_hash); Block { summary, data, previous_summary: previous_hash, nonce, timestamp: Utc::now().timestamp(), genesis: false, } } pub fn new_genesis() -> Block { Block { summary: "NONE".to_string(), data: vec![DataPoint { from: "NOONE".to_string(), to: "NOONE".to_string(), amount: 0.0, }], previous_summary: "NONE".to_string(), nonce: 0, timestamp: 0, genesis: false, } } pub fn verify(&self) -> bool { if !self.genesis { hash(&(data_to_string(&self.data) + &self.previous_summary + self.nonce.to_string().as_str())) == self.summary } else { true } } }
#[doc = "Reader of register ITLINE2"] pub type R = crate::R<u32, super::ITLINE2>; #[doc = "Reader of field `TAMP`"] pub type TAMP_R = crate::R<bool, bool>; #[doc = "Reader of field `RTC`"] pub type RTC_R = crate::R<bool, bool>; impl R { #[doc = "Bit 0 - TAMP"] #[inline(always)] pub fn tamp(&self) -> TAMP_R { TAMP_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - RTC"] #[inline(always)] pub fn rtc(&self) -> RTC_R { RTC_R::new(((self.bits >> 1) & 0x01) != 0) } }
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcCertificateEnumerator(pub ::windows::core::IUnknown); impl IOpcCertificateEnumerator { #[cfg(feature = "Win32_Foundation")] pub unsafe fn MoveNext(&self, hasnext: *mut super::super::super::Foundation::BOOL) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(hasnext)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn MovePrevious(&self, hasprevious: *mut super::super::super::Foundation::BOOL) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(hasprevious)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography"))] pub unsafe fn GetCurrent(&self, certificate: *const *const super::super::super::Security::Cryptography::CERT_CONTEXT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(certificate)).ok() } pub unsafe fn Clone(&self) -> ::windows::core::Result<IOpcCertificateEnumerator> { let mut result__: <IOpcCertificateEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcCertificateEnumerator>(result__) } } unsafe impl ::windows::core::Interface for IOpcCertificateEnumerator { type Vtable = IOpcCertificateEnumerator_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x85131937_8f24_421f_b439_59ab24d140b8); } impl ::core::convert::From<IOpcCertificateEnumerator> for ::windows::core::IUnknown { fn from(value: IOpcCertificateEnumerator) -> Self { value.0 } } impl ::core::convert::From<&IOpcCertificateEnumerator> for ::windows::core::IUnknown { fn from(value: &IOpcCertificateEnumerator) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcCertificateEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcCertificateEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcCertificateEnumerator_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasnext: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasprevious: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, certificate: *const *const super::super::super::Security::Cryptography::CERT_CONTEXT) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, copy: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcCertificateSet(pub ::windows::core::IUnknown); impl IOpcCertificateSet { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography"))] pub unsafe fn Add(&self, certificate: *const super::super::super::Security::Cryptography::CERT_CONTEXT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(certificate)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography"))] pub unsafe fn Remove(&self, certificate: *const super::super::super::Security::Cryptography::CERT_CONTEXT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(certificate)).ok() } pub unsafe fn GetEnumerator(&self) -> ::windows::core::Result<IOpcCertificateEnumerator> { let mut result__: <IOpcCertificateEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcCertificateEnumerator>(result__) } } unsafe impl ::windows::core::Interface for IOpcCertificateSet { type Vtable = IOpcCertificateSet_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x56ea4325_8e2d_4167_b1a4_e486d24c8fa7); } impl ::core::convert::From<IOpcCertificateSet> for ::windows::core::IUnknown { fn from(value: IOpcCertificateSet) -> Self { value.0 } } impl ::core::convert::From<&IOpcCertificateSet> for ::windows::core::IUnknown { fn from(value: &IOpcCertificateSet) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcCertificateSet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcCertificateSet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcCertificateSet_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, certificate: *const super::super::super::Security::Cryptography::CERT_CONTEXT) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, certificate: *const super::super::super::Security::Cryptography::CERT_CONTEXT) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, certificateenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcDigitalSignature(pub ::windows::core::IUnknown); impl IOpcDigitalSignature { #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetNamespaces(&self, prefixes: *mut *mut super::super::super::Foundation::PWSTR, namespaces: *mut *mut super::super::super::Foundation::PWSTR, count: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(prefixes), ::core::mem::transmute(namespaces), ::core::mem::transmute(count)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetSignatureId(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> { let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__) } pub unsafe fn GetSignaturePartName(&self) -> ::windows::core::Result<IOpcPartUri> { let mut result__: <IOpcPartUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcPartUri>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetSignatureMethod(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> { let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__) } pub unsafe fn GetCanonicalizationMethod(&self, canonicalizationmethod: *mut OPC_CANONICALIZATION_METHOD) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(canonicalizationmethod)).ok() } pub unsafe fn GetSignatureValue(&self, signaturevalue: *mut *mut u8, count: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(signaturevalue), ::core::mem::transmute(count)).ok() } pub unsafe fn GetSignaturePartReferenceEnumerator(&self) -> ::windows::core::Result<IOpcSignaturePartReferenceEnumerator> { let mut result__: <IOpcSignaturePartReferenceEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignaturePartReferenceEnumerator>(result__) } pub unsafe fn GetSignatureRelationshipReferenceEnumerator(&self) -> ::windows::core::Result<IOpcSignatureRelationshipReferenceEnumerator> { let mut result__: <IOpcSignatureRelationshipReferenceEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignatureRelationshipReferenceEnumerator>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetSigningTime(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> { let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__) } pub unsafe fn GetTimeFormat(&self, timeformat: *mut OPC_SIGNATURE_TIME_FORMAT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(timeformat)).ok() } pub unsafe fn GetPackageObjectReference(&self) -> ::windows::core::Result<IOpcSignatureReference> { let mut result__: <IOpcSignatureReference as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignatureReference>(result__) } pub unsafe fn GetCertificateEnumerator(&self) -> ::windows::core::Result<IOpcCertificateEnumerator> { let mut result__: <IOpcCertificateEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcCertificateEnumerator>(result__) } pub unsafe fn GetCustomReferenceEnumerator(&self) -> ::windows::core::Result<IOpcSignatureReferenceEnumerator> { let mut result__: <IOpcSignatureReferenceEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignatureReferenceEnumerator>(result__) } pub unsafe fn GetCustomObjectEnumerator(&self) -> ::windows::core::Result<IOpcSignatureCustomObjectEnumerator> { let mut result__: <IOpcSignatureCustomObjectEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignatureCustomObjectEnumerator>(result__) } pub unsafe fn GetSignatureXml(&self, signaturexml: *mut *mut u8, count: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), ::core::mem::transmute(signaturexml), ::core::mem::transmute(count)).ok() } } unsafe impl ::windows::core::Interface for IOpcDigitalSignature { type Vtable = IOpcDigitalSignature_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x52ab21dd_1cd0_4949_bc80_0c1232d00cb4); } impl ::core::convert::From<IOpcDigitalSignature> for ::windows::core::IUnknown { fn from(value: IOpcDigitalSignature) -> Self { value.0 } } impl ::core::convert::From<&IOpcDigitalSignature> for ::windows::core::IUnknown { fn from(value: &IOpcDigitalSignature) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcDigitalSignature { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcDigitalSignature { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcDigitalSignature_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, prefixes: *mut *mut super::super::super::Foundation::PWSTR, namespaces: *mut *mut super::super::super::Foundation::PWSTR, count: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signatureid: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signaturepartname: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signaturemethod: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, canonicalizationmethod: *mut OPC_CANONICALIZATION_METHOD) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signaturevalue: *mut *mut u8, count: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, partreferenceenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipreferenceenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signingtime: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, timeformat: *mut OPC_SIGNATURE_TIME_FORMAT) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, packageobjectreference: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, certificateenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, customreferenceenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, customobjectenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signaturexml: *mut *mut u8, count: *mut u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcDigitalSignatureEnumerator(pub ::windows::core::IUnknown); impl IOpcDigitalSignatureEnumerator { #[cfg(feature = "Win32_Foundation")] pub unsafe fn MoveNext(&self) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn MovePrevious(&self) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } pub unsafe fn GetCurrent(&self) -> ::windows::core::Result<IOpcDigitalSignature> { let mut result__: <IOpcDigitalSignature as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcDigitalSignature>(result__) } pub unsafe fn Clone(&self) -> ::windows::core::Result<IOpcDigitalSignatureEnumerator> { let mut result__: <IOpcDigitalSignatureEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcDigitalSignatureEnumerator>(result__) } } unsafe impl ::windows::core::Interface for IOpcDigitalSignatureEnumerator { type Vtable = IOpcDigitalSignatureEnumerator_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x967b6882_0ba3_4358_b9e7_b64c75063c5e); } impl ::core::convert::From<IOpcDigitalSignatureEnumerator> for ::windows::core::IUnknown { fn from(value: IOpcDigitalSignatureEnumerator) -> Self { value.0 } } impl ::core::convert::From<&IOpcDigitalSignatureEnumerator> for ::windows::core::IUnknown { fn from(value: &IOpcDigitalSignatureEnumerator) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcDigitalSignatureEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcDigitalSignatureEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcDigitalSignatureEnumerator_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasnext: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasprevious: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, digitalsignature: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, copy: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcDigitalSignatureManager(pub ::windows::core::IUnknown); impl IOpcDigitalSignatureManager { pub unsafe fn GetSignatureOriginPartName(&self) -> ::windows::core::Result<IOpcPartUri> { let mut result__: <IOpcPartUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcPartUri>(result__) } pub unsafe fn SetSignatureOriginPartName<'a, Param0: ::windows::core::IntoParam<'a, IOpcPartUri>>(&self, signatureoriginpartname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), signatureoriginpartname.into_param().abi()).ok() } pub unsafe fn GetSignatureEnumerator(&self) -> ::windows::core::Result<IOpcDigitalSignatureEnumerator> { let mut result__: <IOpcDigitalSignatureEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcDigitalSignatureEnumerator>(result__) } pub unsafe fn RemoveSignature<'a, Param0: ::windows::core::IntoParam<'a, IOpcPartUri>>(&self, signaturepartname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), signaturepartname.into_param().abi()).ok() } pub unsafe fn CreateSigningOptions(&self) -> ::windows::core::Result<IOpcSigningOptions> { let mut result__: <IOpcSigningOptions as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSigningOptions>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography"))] pub unsafe fn Validate<'a, Param0: ::windows::core::IntoParam<'a, IOpcDigitalSignature>>(&self, signature: Param0, certificate: *const super::super::super::Security::Cryptography::CERT_CONTEXT, validationresult: *mut OPC_SIGNATURE_VALIDATION_RESULT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), signature.into_param().abi(), ::core::mem::transmute(certificate), ::core::mem::transmute(validationresult)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography"))] pub unsafe fn Sign<'a, Param1: ::windows::core::IntoParam<'a, IOpcSigningOptions>>(&self, certificate: *const super::super::super::Security::Cryptography::CERT_CONTEXT, signingoptions: Param1) -> ::windows::core::Result<IOpcDigitalSignature> { let mut result__: <IOpcDigitalSignature as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(certificate), signingoptions.into_param().abi(), &mut result__).from_abi::<IOpcDigitalSignature>(result__) } pub unsafe fn ReplaceSignatureXml<'a, Param0: ::windows::core::IntoParam<'a, IOpcPartUri>>(&self, signaturepartname: Param0, newsignaturexml: *const u8, count: u32) -> ::windows::core::Result<IOpcDigitalSignature> { let mut result__: <IOpcDigitalSignature as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), signaturepartname.into_param().abi(), ::core::mem::transmute(newsignaturexml), ::core::mem::transmute(count), &mut result__).from_abi::<IOpcDigitalSignature>(result__) } } unsafe impl ::windows::core::Interface for IOpcDigitalSignatureManager { type Vtable = IOpcDigitalSignatureManager_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd5e62a0b_696d_462f_94df_72e33cef2659); } impl ::core::convert::From<IOpcDigitalSignatureManager> for ::windows::core::IUnknown { fn from(value: IOpcDigitalSignatureManager) -> Self { value.0 } } impl ::core::convert::From<&IOpcDigitalSignatureManager> for ::windows::core::IUnknown { fn from(value: &IOpcDigitalSignatureManager) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcDigitalSignatureManager { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcDigitalSignatureManager { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcDigitalSignatureManager_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signatureoriginpartname: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signatureoriginpartname: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signatureenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signaturepartname: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signingoptions: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signature: ::windows::core::RawPtr, certificate: *const super::super::super::Security::Cryptography::CERT_CONTEXT, validationresult: *mut OPC_SIGNATURE_VALIDATION_RESULT) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, certificate: *const super::super::super::Security::Cryptography::CERT_CONTEXT, signingoptions: ::windows::core::RawPtr, digitalsignature: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signaturepartname: ::windows::core::RawPtr, newsignaturexml: *const u8, count: u32, digitalsignature: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcFactory(pub ::windows::core::IUnknown); impl IOpcFactory { pub unsafe fn CreatePackageRootUri(&self) -> ::windows::core::Result<IOpcUri> { let mut result__: <IOpcUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcUri>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreatePartUri<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, pwzuri: Param0) -> ::windows::core::Result<IOpcPartUri> { let mut result__: <IOpcPartUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), pwzuri.into_param().abi(), &mut result__).from_abi::<IOpcPartUri>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_System_Com"))] pub unsafe fn CreateStreamOnFile<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, filename: Param0, iomode: OPC_STREAM_IO_MODE, securityattributes: *const super::super::super::Security::SECURITY_ATTRIBUTES, dwflagsandattributes: u32) -> ::windows::core::Result<super::super::super::System::Com::IStream> { let mut result__: <super::super::super::System::Com::IStream as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), filename.into_param().abi(), ::core::mem::transmute(iomode), ::core::mem::transmute(securityattributes), ::core::mem::transmute(dwflagsandattributes), &mut result__).from_abi::<super::super::super::System::Com::IStream>(result__) } pub unsafe fn CreatePackage(&self) -> ::windows::core::Result<IOpcPackage> { let mut result__: <IOpcPackage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcPackage>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn ReadPackageFromStream<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::IStream>>(&self, stream: Param0, flags: OPC_READ_FLAGS) -> ::windows::core::Result<IOpcPackage> { let mut result__: <IOpcPackage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), stream.into_param().abi(), ::core::mem::transmute(flags), &mut result__).from_abi::<IOpcPackage>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn WritePackageToStream<'a, Param0: ::windows::core::IntoParam<'a, IOpcPackage>, Param2: ::windows::core::IntoParam<'a, super::super::super::System::Com::IStream>>(&self, package: Param0, flags: OPC_WRITE_FLAGS, stream: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), package.into_param().abi(), ::core::mem::transmute(flags), stream.into_param().abi()).ok() } pub unsafe fn CreateDigitalSignatureManager<'a, Param0: ::windows::core::IntoParam<'a, IOpcPackage>>(&self, package: Param0) -> ::windows::core::Result<IOpcDigitalSignatureManager> { let mut result__: <IOpcDigitalSignatureManager as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), package.into_param().abi(), &mut result__).from_abi::<IOpcDigitalSignatureManager>(result__) } } unsafe impl ::windows::core::Interface for IOpcFactory { type Vtable = IOpcFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6d0b4446_cd73_4ab3_94f4_8ccdf6116154); } impl ::core::convert::From<IOpcFactory> for ::windows::core::IUnknown { fn from(value: IOpcFactory) -> Self { value.0 } } impl ::core::convert::From<&IOpcFactory> for ::windows::core::IUnknown { fn from(value: &IOpcFactory) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcFactory { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcFactory { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcFactory_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, rooturi: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pwzuri: super::super::super::Foundation::PWSTR, parturi: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, filename: super::super::super::Foundation::PWSTR, iomode: OPC_STREAM_IO_MODE, securityattributes: *const super::super::super::Security::SECURITY_ATTRIBUTES, dwflagsandattributes: u32, stream: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_System_Com")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, package: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, stream: ::windows::core::RawPtr, flags: OPC_READ_FLAGS, package: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, package: ::windows::core::RawPtr, flags: OPC_WRITE_FLAGS, stream: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, package: ::windows::core::RawPtr, signaturemanager: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcPackage(pub ::windows::core::IUnknown); impl IOpcPackage { pub unsafe fn GetPartSet(&self) -> ::windows::core::Result<IOpcPartSet> { let mut result__: <IOpcPartSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcPartSet>(result__) } pub unsafe fn GetRelationshipSet(&self) -> ::windows::core::Result<IOpcRelationshipSet> { let mut result__: <IOpcRelationshipSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcRelationshipSet>(result__) } } unsafe impl ::windows::core::Interface for IOpcPackage { type Vtable = IOpcPackage_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x42195949_3b79_4fc8_89c6_fc7fb979ee70); } impl ::core::convert::From<IOpcPackage> for ::windows::core::IUnknown { fn from(value: IOpcPackage) -> Self { value.0 } } impl ::core::convert::From<&IOpcPackage> for ::windows::core::IUnknown { fn from(value: &IOpcPackage) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcPackage { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcPackage { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcPackage_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, partset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcPart(pub ::windows::core::IUnknown); impl IOpcPart { pub unsafe fn GetRelationshipSet(&self) -> ::windows::core::Result<IOpcRelationshipSet> { let mut result__: <IOpcRelationshipSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcRelationshipSet>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetContentStream(&self) -> ::windows::core::Result<super::super::super::System::Com::IStream> { let mut result__: <super::super::super::System::Com::IStream as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::System::Com::IStream>(result__) } pub unsafe fn GetName(&self) -> ::windows::core::Result<IOpcPartUri> { let mut result__: <IOpcPartUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcPartUri>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetContentType(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> { let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__) } pub unsafe fn GetCompressionOptions(&self) -> ::windows::core::Result<OPC_COMPRESSION_OPTIONS> { let mut result__: <OPC_COMPRESSION_OPTIONS as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<OPC_COMPRESSION_OPTIONS>(result__) } } unsafe impl ::windows::core::Interface for IOpcPart { type Vtable = IOpcPart_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x42195949_3b79_4fc8_89c6_fc7fb979ee71); } impl ::core::convert::From<IOpcPart> for ::windows::core::IUnknown { fn from(value: IOpcPart) -> Self { value.0 } } impl ::core::convert::From<&IOpcPart> for ::windows::core::IUnknown { fn from(value: &IOpcPart) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcPart { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcPart { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcPart_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, stream: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, name: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, contenttype: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, compressionoptions: *mut OPC_COMPRESSION_OPTIONS) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcPartEnumerator(pub ::windows::core::IUnknown); impl IOpcPartEnumerator { #[cfg(feature = "Win32_Foundation")] pub unsafe fn MoveNext(&self) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn MovePrevious(&self) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } pub unsafe fn GetCurrent(&self) -> ::windows::core::Result<IOpcPart> { let mut result__: <IOpcPart as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcPart>(result__) } pub unsafe fn Clone(&self) -> ::windows::core::Result<IOpcPartEnumerator> { let mut result__: <IOpcPartEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcPartEnumerator>(result__) } } unsafe impl ::windows::core::Interface for IOpcPartEnumerator { type Vtable = IOpcPartEnumerator_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x42195949_3b79_4fc8_89c6_fc7fb979ee75); } impl ::core::convert::From<IOpcPartEnumerator> for ::windows::core::IUnknown { fn from(value: IOpcPartEnumerator) -> Self { value.0 } } impl ::core::convert::From<&IOpcPartEnumerator> for ::windows::core::IUnknown { fn from(value: &IOpcPartEnumerator) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcPartEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcPartEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcPartEnumerator_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasnext: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasprevious: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, part: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, copy: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcPartSet(pub ::windows::core::IUnknown); impl IOpcPartSet { pub unsafe fn GetPart<'a, Param0: ::windows::core::IntoParam<'a, IOpcPartUri>>(&self, name: Param0) -> ::windows::core::Result<IOpcPart> { let mut result__: <IOpcPart as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), name.into_param().abi(), &mut result__).from_abi::<IOpcPart>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreatePart<'a, Param0: ::windows::core::IntoParam<'a, IOpcPartUri>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, name: Param0, contenttype: Param1, compressionoptions: OPC_COMPRESSION_OPTIONS) -> ::windows::core::Result<IOpcPart> { let mut result__: <IOpcPart as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), name.into_param().abi(), contenttype.into_param().abi(), ::core::mem::transmute(compressionoptions), &mut result__).from_abi::<IOpcPart>(result__) } pub unsafe fn DeletePart<'a, Param0: ::windows::core::IntoParam<'a, IOpcPartUri>>(&self, name: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), name.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PartExists<'a, Param0: ::windows::core::IntoParam<'a, IOpcPartUri>>(&self, name: Param0) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), name.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } pub unsafe fn GetEnumerator(&self) -> ::windows::core::Result<IOpcPartEnumerator> { let mut result__: <IOpcPartEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcPartEnumerator>(result__) } } unsafe impl ::windows::core::Interface for IOpcPartSet { type Vtable = IOpcPartSet_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x42195949_3b79_4fc8_89c6_fc7fb979ee73); } impl ::core::convert::From<IOpcPartSet> for ::windows::core::IUnknown { fn from(value: IOpcPartSet) -> Self { value.0 } } impl ::core::convert::From<&IOpcPartSet> for ::windows::core::IUnknown { fn from(value: &IOpcPartSet) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcPartSet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcPartSet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcPartSet_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, name: ::windows::core::RawPtr, part: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, name: ::windows::core::RawPtr, contenttype: super::super::super::Foundation::PWSTR, compressionoptions: OPC_COMPRESSION_OPTIONS, part: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, name: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, name: ::windows::core::RawPtr, partexists: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, partenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcPartUri(pub ::windows::core::IUnknown); impl IOpcPartUri { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn GetPropertyBSTR(&self, uriprop: super::super::super::System::Com::Uri_PROPERTY, pbstrproperty: *mut super::super::super::Foundation::BSTR, dwflags: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(uriprop), ::core::mem::transmute(pbstrproperty), ::core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetPropertyLength(&self, uriprop: super::super::super::System::Com::Uri_PROPERTY, pcchproperty: *mut u32, dwflags: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(uriprop), ::core::mem::transmute(pcchproperty), ::core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetPropertyDWORD(&self, uriprop: super::super::super::System::Com::Uri_PROPERTY, pdwproperty: *mut u32, dwflags: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(uriprop), ::core::mem::transmute(pdwproperty), ::core::mem::transmute(dwflags)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn HasProperty(&self, uriprop: super::super::super::System::Com::Uri_PROPERTY) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(uriprop), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetAbsoluteUri(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetAuthority(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetDisplayUri(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetDomain(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetExtension(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetFragment(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetHost(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetPassword(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetPath(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetPathAndQuery(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetQuery(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetRawUri(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetSchemeName(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetUserInfo(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetUserName(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } pub unsafe fn GetHostType(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } pub unsafe fn GetPort(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } pub unsafe fn GetScheme(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } pub unsafe fn GetZone(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } pub unsafe fn GetProperties(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn IsEqual<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::IUri>>(&self, puri: Param0) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), puri.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } pub unsafe fn GetRelationshipsPartUri(&self) -> ::windows::core::Result<IOpcPartUri> { let mut result__: <IOpcPartUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcPartUri>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetRelativeUri<'a, Param0: ::windows::core::IntoParam<'a, IOpcPartUri>>(&self, targetparturi: Param0) -> ::windows::core::Result<super::super::super::System::Com::IUri> { let mut result__: <super::super::super::System::Com::IUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), targetparturi.into_param().abi(), &mut result__).from_abi::<super::super::super::System::Com::IUri>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CombinePartUri<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::IUri>>(&self, relativeuri: Param0) -> ::windows::core::Result<IOpcPartUri> { let mut result__: <IOpcPartUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), relativeuri.into_param().abi(), &mut result__).from_abi::<IOpcPartUri>(result__) } pub unsafe fn ComparePartUri<'a, Param0: ::windows::core::IntoParam<'a, IOpcPartUri>>(&self, parturi: Param0) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), parturi.into_param().abi(), &mut result__).from_abi::<i32>(result__) } pub unsafe fn GetSourceUri(&self) -> ::windows::core::Result<IOpcUri> { let mut result__: <IOpcUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcUri>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn IsRelationshipsPartUri(&self) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } } unsafe impl ::windows::core::Interface for IOpcPartUri { type Vtable = IOpcPartUri_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7d3babe7_88b2_46ba_85cb_4203cb016c87); } impl ::core::convert::From<IOpcPartUri> for ::windows::core::IUnknown { fn from(value: IOpcPartUri) -> Self { value.0 } } impl ::core::convert::From<&IOpcPartUri> for ::windows::core::IUnknown { fn from(value: &IOpcPartUri) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcPartUri { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcPartUri { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IOpcPartUri> for IOpcUri { fn from(value: IOpcPartUri) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IOpcPartUri> for IOpcUri { fn from(value: &IOpcPartUri) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IOpcUri> for IOpcPartUri { fn into_param(self) -> ::windows::core::Param<'a, IOpcUri> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IOpcUri> for &IOpcPartUri { fn into_param(self) -> ::windows::core::Param<'a, IOpcUri> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IOpcPartUri> for super::super::super::System::Com::IUri { fn from(value: IOpcPartUri) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IOpcPartUri> for super::super::super::System::Com::IUri { fn from(value: &IOpcPartUri) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::super::System::Com::IUri> for IOpcPartUri { fn into_param(self) -> ::windows::core::Param<'a, super::super::super::System::Com::IUri> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::super::System::Com::IUri> for &IOpcPartUri { fn into_param(self) -> ::windows::core::Param<'a, super::super::super::System::Com::IUri> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IOpcPartUri_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uriprop: super::super::super::System::Com::Uri_PROPERTY, pbstrproperty: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>, dwflags: u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uriprop: super::super::super::System::Com::Uri_PROPERTY, pcchproperty: *mut u32, dwflags: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uriprop: super::super::super::System::Com::Uri_PROPERTY, pdwproperty: *mut u32, dwflags: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uriprop: super::super::super::System::Com::Uri_PROPERTY, pfhasproperty: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrabsoluteuri: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrauthority: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrdisplaystring: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrdomain: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrextension: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrfragment: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrhost: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrpassword: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrpath: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrpathandquery: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrquery: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrrawuri: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrschemename: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstruserinfo: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrusername: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pdwhosttype: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pdwport: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pdwscheme: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pdwzone: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pdwflags: *mut u32) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, puri: ::windows::core::RawPtr, pfequal: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipparturi: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, targetparturi: ::windows::core::RawPtr, relativeuri: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relativeuri: ::windows::core::RawPtr, combineduri: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, parturi: ::windows::core::RawPtr, comparisonresult: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, sourceuri: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, isrelationshipuri: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcRelationship(pub ::windows::core::IUnknown); impl IOpcRelationship { #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetId(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> { let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetRelationshipType(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> { let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__) } pub unsafe fn GetSourceUri(&self) -> ::windows::core::Result<IOpcUri> { let mut result__: <IOpcUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcUri>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTargetUri(&self) -> ::windows::core::Result<super::super::super::System::Com::IUri> { let mut result__: <super::super::super::System::Com::IUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::System::Com::IUri>(result__) } pub unsafe fn GetTargetMode(&self) -> ::windows::core::Result<OPC_URI_TARGET_MODE> { let mut result__: <OPC_URI_TARGET_MODE as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<OPC_URI_TARGET_MODE>(result__) } } unsafe impl ::windows::core::Interface for IOpcRelationship { type Vtable = IOpcRelationship_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x42195949_3b79_4fc8_89c6_fc7fb979ee72); } impl ::core::convert::From<IOpcRelationship> for ::windows::core::IUnknown { fn from(value: IOpcRelationship) -> Self { value.0 } } impl ::core::convert::From<&IOpcRelationship> for ::windows::core::IUnknown { fn from(value: &IOpcRelationship) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcRelationship { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcRelationship { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcRelationship_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipidentifier: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshiptype: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, sourceuri: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, targeturi: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, targetmode: *mut OPC_URI_TARGET_MODE) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcRelationshipEnumerator(pub ::windows::core::IUnknown); impl IOpcRelationshipEnumerator { #[cfg(feature = "Win32_Foundation")] pub unsafe fn MoveNext(&self) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn MovePrevious(&self) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } pub unsafe fn GetCurrent(&self) -> ::windows::core::Result<IOpcRelationship> { let mut result__: <IOpcRelationship as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcRelationship>(result__) } pub unsafe fn Clone(&self) -> ::windows::core::Result<IOpcRelationshipEnumerator> { let mut result__: <IOpcRelationshipEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcRelationshipEnumerator>(result__) } } unsafe impl ::windows::core::Interface for IOpcRelationshipEnumerator { type Vtable = IOpcRelationshipEnumerator_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x42195949_3b79_4fc8_89c6_fc7fb979ee76); } impl ::core::convert::From<IOpcRelationshipEnumerator> for ::windows::core::IUnknown { fn from(value: IOpcRelationshipEnumerator) -> Self { value.0 } } impl ::core::convert::From<&IOpcRelationshipEnumerator> for ::windows::core::IUnknown { fn from(value: &IOpcRelationshipEnumerator) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcRelationshipEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcRelationshipEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcRelationshipEnumerator_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasnext: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasprevious: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationship: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, copy: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcRelationshipSelector(pub ::windows::core::IUnknown); impl IOpcRelationshipSelector { pub unsafe fn GetSelectorType(&self) -> ::windows::core::Result<OPC_RELATIONSHIP_SELECTOR> { let mut result__: <OPC_RELATIONSHIP_SELECTOR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<OPC_RELATIONSHIP_SELECTOR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetSelectionCriterion(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> { let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__) } } unsafe impl ::windows::core::Interface for IOpcRelationshipSelector { type Vtable = IOpcRelationshipSelector_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf8f26c7f_b28f_4899_84c8_5d5639ede75f); } impl ::core::convert::From<IOpcRelationshipSelector> for ::windows::core::IUnknown { fn from(value: IOpcRelationshipSelector) -> Self { value.0 } } impl ::core::convert::From<&IOpcRelationshipSelector> for ::windows::core::IUnknown { fn from(value: &IOpcRelationshipSelector) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcRelationshipSelector { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcRelationshipSelector { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcRelationshipSelector_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, selector: *mut OPC_RELATIONSHIP_SELECTOR) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, selectioncriterion: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcRelationshipSelectorEnumerator(pub ::windows::core::IUnknown); impl IOpcRelationshipSelectorEnumerator { #[cfg(feature = "Win32_Foundation")] pub unsafe fn MoveNext(&self) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn MovePrevious(&self) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } pub unsafe fn GetCurrent(&self) -> ::windows::core::Result<IOpcRelationshipSelector> { let mut result__: <IOpcRelationshipSelector as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcRelationshipSelector>(result__) } pub unsafe fn Clone(&self) -> ::windows::core::Result<IOpcRelationshipSelectorEnumerator> { let mut result__: <IOpcRelationshipSelectorEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcRelationshipSelectorEnumerator>(result__) } } unsafe impl ::windows::core::Interface for IOpcRelationshipSelectorEnumerator { type Vtable = IOpcRelationshipSelectorEnumerator_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5e50a181_a91b_48ac_88d2_bca3d8f8c0b1); } impl ::core::convert::From<IOpcRelationshipSelectorEnumerator> for ::windows::core::IUnknown { fn from(value: IOpcRelationshipSelectorEnumerator) -> Self { value.0 } } impl ::core::convert::From<&IOpcRelationshipSelectorEnumerator> for ::windows::core::IUnknown { fn from(value: &IOpcRelationshipSelectorEnumerator) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcRelationshipSelectorEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcRelationshipSelectorEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcRelationshipSelectorEnumerator_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasnext: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasprevious: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipselector: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, copy: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcRelationshipSelectorSet(pub ::windows::core::IUnknown); impl IOpcRelationshipSelectorSet { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Create<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, selector: OPC_RELATIONSHIP_SELECTOR, selectioncriterion: Param1) -> ::windows::core::Result<IOpcRelationshipSelector> { let mut result__: <IOpcRelationshipSelector as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(selector), selectioncriterion.into_param().abi(), &mut result__).from_abi::<IOpcRelationshipSelector>(result__) } pub unsafe fn Delete<'a, Param0: ::windows::core::IntoParam<'a, IOpcRelationshipSelector>>(&self, relationshipselector: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), relationshipselector.into_param().abi()).ok() } pub unsafe fn GetEnumerator(&self) -> ::windows::core::Result<IOpcRelationshipSelectorEnumerator> { let mut result__: <IOpcRelationshipSelectorEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcRelationshipSelectorEnumerator>(result__) } } unsafe impl ::windows::core::Interface for IOpcRelationshipSelectorSet { type Vtable = IOpcRelationshipSelectorSet_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6e34c269_a4d3_47c0_b5c4_87ff2b3b6136); } impl ::core::convert::From<IOpcRelationshipSelectorSet> for ::windows::core::IUnknown { fn from(value: IOpcRelationshipSelectorSet) -> Self { value.0 } } impl ::core::convert::From<&IOpcRelationshipSelectorSet> for ::windows::core::IUnknown { fn from(value: &IOpcRelationshipSelectorSet) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcRelationshipSelectorSet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcRelationshipSelectorSet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcRelationshipSelectorSet_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, selector: OPC_RELATIONSHIP_SELECTOR, selectioncriterion: super::super::super::Foundation::PWSTR, relationshipselector: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipselector: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipselectorenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcRelationshipSet(pub ::windows::core::IUnknown); impl IOpcRelationshipSet { #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetRelationship<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, relationshipidentifier: Param0) -> ::windows::core::Result<IOpcRelationship> { let mut result__: <IOpcRelationship as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), relationshipidentifier.into_param().abi(), &mut result__).from_abi::<IOpcRelationship>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn CreateRelationship<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::super::System::Com::IUri>>(&self, relationshipidentifier: Param0, relationshiptype: Param1, targeturi: Param2, targetmode: OPC_URI_TARGET_MODE) -> ::windows::core::Result<IOpcRelationship> { let mut result__: <IOpcRelationship as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), relationshipidentifier.into_param().abi(), relationshiptype.into_param().abi(), targeturi.into_param().abi(), ::core::mem::transmute(targetmode), &mut result__).from_abi::<IOpcRelationship>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DeleteRelationship<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, relationshipidentifier: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), relationshipidentifier.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn RelationshipExists<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, relationshipidentifier: Param0) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), relationshipidentifier.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } pub unsafe fn GetEnumerator(&self) -> ::windows::core::Result<IOpcRelationshipEnumerator> { let mut result__: <IOpcRelationshipEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcRelationshipEnumerator>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetEnumeratorForType<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, relationshiptype: Param0) -> ::windows::core::Result<IOpcRelationshipEnumerator> { let mut result__: <IOpcRelationshipEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), relationshiptype.into_param().abi(), &mut result__).from_abi::<IOpcRelationshipEnumerator>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetRelationshipsContentStream(&self) -> ::windows::core::Result<super::super::super::System::Com::IStream> { let mut result__: <super::super::super::System::Com::IStream as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::System::Com::IStream>(result__) } } unsafe impl ::windows::core::Interface for IOpcRelationshipSet { type Vtable = IOpcRelationshipSet_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x42195949_3b79_4fc8_89c6_fc7fb979ee74); } impl ::core::convert::From<IOpcRelationshipSet> for ::windows::core::IUnknown { fn from(value: IOpcRelationshipSet) -> Self { value.0 } } impl ::core::convert::From<&IOpcRelationshipSet> for ::windows::core::IUnknown { fn from(value: &IOpcRelationshipSet) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcRelationshipSet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcRelationshipSet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcRelationshipSet_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipidentifier: super::super::super::Foundation::PWSTR, relationship: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipidentifier: super::super::super::Foundation::PWSTR, relationshiptype: super::super::super::Foundation::PWSTR, targeturi: ::windows::core::RawPtr, targetmode: OPC_URI_TARGET_MODE, relationship: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipidentifier: super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipidentifier: super::super::super::Foundation::PWSTR, relationshipexists: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshiptype: super::super::super::Foundation::PWSTR, relationshipenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, contents: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcSignatureCustomObject(pub ::windows::core::IUnknown); impl IOpcSignatureCustomObject { pub unsafe fn GetXml(&self, xmlmarkup: *mut *mut u8, count: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(xmlmarkup), ::core::mem::transmute(count)).ok() } } unsafe impl ::windows::core::Interface for IOpcSignatureCustomObject { type Vtable = IOpcSignatureCustomObject_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5d77a19e_62c1_44e7_becd_45da5ae51a56); } impl ::core::convert::From<IOpcSignatureCustomObject> for ::windows::core::IUnknown { fn from(value: IOpcSignatureCustomObject) -> Self { value.0 } } impl ::core::convert::From<&IOpcSignatureCustomObject> for ::windows::core::IUnknown { fn from(value: &IOpcSignatureCustomObject) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcSignatureCustomObject { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcSignatureCustomObject { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcSignatureCustomObject_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, xmlmarkup: *mut *mut u8, count: *mut u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcSignatureCustomObjectEnumerator(pub ::windows::core::IUnknown); impl IOpcSignatureCustomObjectEnumerator { #[cfg(feature = "Win32_Foundation")] pub unsafe fn MoveNext(&self) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn MovePrevious(&self) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } pub unsafe fn GetCurrent(&self) -> ::windows::core::Result<IOpcSignatureCustomObject> { let mut result__: <IOpcSignatureCustomObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignatureCustomObject>(result__) } pub unsafe fn Clone(&self) -> ::windows::core::Result<IOpcSignatureCustomObjectEnumerator> { let mut result__: <IOpcSignatureCustomObjectEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignatureCustomObjectEnumerator>(result__) } } unsafe impl ::windows::core::Interface for IOpcSignatureCustomObjectEnumerator { type Vtable = IOpcSignatureCustomObjectEnumerator_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5ee4fe1d_e1b0_4683_8079_7ea0fcf80b4c); } impl ::core::convert::From<IOpcSignatureCustomObjectEnumerator> for ::windows::core::IUnknown { fn from(value: IOpcSignatureCustomObjectEnumerator) -> Self { value.0 } } impl ::core::convert::From<&IOpcSignatureCustomObjectEnumerator> for ::windows::core::IUnknown { fn from(value: &IOpcSignatureCustomObjectEnumerator) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcSignatureCustomObjectEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcSignatureCustomObjectEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcSignatureCustomObjectEnumerator_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasnext: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasprevious: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, customobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, copy: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcSignatureCustomObjectSet(pub ::windows::core::IUnknown); impl IOpcSignatureCustomObjectSet { pub unsafe fn Create(&self, xmlmarkup: *const u8, count: u32) -> ::windows::core::Result<IOpcSignatureCustomObject> { let mut result__: <IOpcSignatureCustomObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(xmlmarkup), ::core::mem::transmute(count), &mut result__).from_abi::<IOpcSignatureCustomObject>(result__) } pub unsafe fn Delete<'a, Param0: ::windows::core::IntoParam<'a, IOpcSignatureCustomObject>>(&self, customobject: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), customobject.into_param().abi()).ok() } pub unsafe fn GetEnumerator(&self) -> ::windows::core::Result<IOpcSignatureCustomObjectEnumerator> { let mut result__: <IOpcSignatureCustomObjectEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignatureCustomObjectEnumerator>(result__) } } unsafe impl ::windows::core::Interface for IOpcSignatureCustomObjectSet { type Vtable = IOpcSignatureCustomObjectSet_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8f792ac5_7947_4e11_bc3d_2659ff046ae1); } impl ::core::convert::From<IOpcSignatureCustomObjectSet> for ::windows::core::IUnknown { fn from(value: IOpcSignatureCustomObjectSet) -> Self { value.0 } } impl ::core::convert::From<&IOpcSignatureCustomObjectSet> for ::windows::core::IUnknown { fn from(value: &IOpcSignatureCustomObjectSet) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcSignatureCustomObjectSet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcSignatureCustomObjectSet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcSignatureCustomObjectSet_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, xmlmarkup: *const u8, count: u32, customobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, customobject: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, customobjectenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcSignaturePartReference(pub ::windows::core::IUnknown); impl IOpcSignaturePartReference { pub unsafe fn GetPartName(&self) -> ::windows::core::Result<IOpcPartUri> { let mut result__: <IOpcPartUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcPartUri>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetContentType(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> { let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetDigestMethod(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> { let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__) } pub unsafe fn GetDigestValue(&self, digestvalue: *mut *mut u8, count: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(digestvalue), ::core::mem::transmute(count)).ok() } pub unsafe fn GetTransformMethod(&self) -> ::windows::core::Result<OPC_CANONICALIZATION_METHOD> { let mut result__: <OPC_CANONICALIZATION_METHOD as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<OPC_CANONICALIZATION_METHOD>(result__) } } unsafe impl ::windows::core::Interface for IOpcSignaturePartReference { type Vtable = IOpcSignaturePartReference_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe24231ca_59f4_484e_b64b_36eeda36072c); } impl ::core::convert::From<IOpcSignaturePartReference> for ::windows::core::IUnknown { fn from(value: IOpcSignaturePartReference) -> Self { value.0 } } impl ::core::convert::From<&IOpcSignaturePartReference> for ::windows::core::IUnknown { fn from(value: &IOpcSignaturePartReference) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcSignaturePartReference { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcSignaturePartReference { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcSignaturePartReference_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, partname: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, contenttype: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, digestmethod: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, digestvalue: *mut *mut u8, count: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, transformmethod: *mut OPC_CANONICALIZATION_METHOD) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcSignaturePartReferenceEnumerator(pub ::windows::core::IUnknown); impl IOpcSignaturePartReferenceEnumerator { #[cfg(feature = "Win32_Foundation")] pub unsafe fn MoveNext(&self) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn MovePrevious(&self) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } pub unsafe fn GetCurrent(&self) -> ::windows::core::Result<IOpcSignaturePartReference> { let mut result__: <IOpcSignaturePartReference as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignaturePartReference>(result__) } pub unsafe fn Clone(&self) -> ::windows::core::Result<IOpcSignaturePartReferenceEnumerator> { let mut result__: <IOpcSignaturePartReferenceEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignaturePartReferenceEnumerator>(result__) } } unsafe impl ::windows::core::Interface for IOpcSignaturePartReferenceEnumerator { type Vtable = IOpcSignaturePartReferenceEnumerator_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x80eb1561_8c77_49cf_8266_459b356ee99a); } impl ::core::convert::From<IOpcSignaturePartReferenceEnumerator> for ::windows::core::IUnknown { fn from(value: IOpcSignaturePartReferenceEnumerator) -> Self { value.0 } } impl ::core::convert::From<&IOpcSignaturePartReferenceEnumerator> for ::windows::core::IUnknown { fn from(value: &IOpcSignaturePartReferenceEnumerator) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcSignaturePartReferenceEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcSignaturePartReferenceEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcSignaturePartReferenceEnumerator_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasnext: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasprevious: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, partreference: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, copy: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcSignaturePartReferenceSet(pub ::windows::core::IUnknown); impl IOpcSignaturePartReferenceSet { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Create<'a, Param0: ::windows::core::IntoParam<'a, IOpcPartUri>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, parturi: Param0, digestmethod: Param1, transformmethod: OPC_CANONICALIZATION_METHOD) -> ::windows::core::Result<IOpcSignaturePartReference> { let mut result__: <IOpcSignaturePartReference as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), parturi.into_param().abi(), digestmethod.into_param().abi(), ::core::mem::transmute(transformmethod), &mut result__).from_abi::<IOpcSignaturePartReference>(result__) } pub unsafe fn Delete<'a, Param0: ::windows::core::IntoParam<'a, IOpcSignaturePartReference>>(&self, partreference: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), partreference.into_param().abi()).ok() } pub unsafe fn GetEnumerator(&self) -> ::windows::core::Result<IOpcSignaturePartReferenceEnumerator> { let mut result__: <IOpcSignaturePartReferenceEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignaturePartReferenceEnumerator>(result__) } } unsafe impl ::windows::core::Interface for IOpcSignaturePartReferenceSet { type Vtable = IOpcSignaturePartReferenceSet_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6c9fe28c_ecd9_4b22_9d36_7fdde670fec0); } impl ::core::convert::From<IOpcSignaturePartReferenceSet> for ::windows::core::IUnknown { fn from(value: IOpcSignaturePartReferenceSet) -> Self { value.0 } } impl ::core::convert::From<&IOpcSignaturePartReferenceSet> for ::windows::core::IUnknown { fn from(value: &IOpcSignaturePartReferenceSet) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcSignaturePartReferenceSet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcSignaturePartReferenceSet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcSignaturePartReferenceSet_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, parturi: ::windows::core::RawPtr, digestmethod: super::super::super::Foundation::PWSTR, transformmethod: OPC_CANONICALIZATION_METHOD, partreference: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, partreference: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, partreferenceenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcSignatureReference(pub ::windows::core::IUnknown); impl IOpcSignatureReference { #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetId(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> { let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetUri(&self) -> ::windows::core::Result<super::super::super::System::Com::IUri> { let mut result__: <super::super::super::System::Com::IUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::System::Com::IUri>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetType(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> { let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__) } pub unsafe fn GetTransformMethod(&self) -> ::windows::core::Result<OPC_CANONICALIZATION_METHOD> { let mut result__: <OPC_CANONICALIZATION_METHOD as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<OPC_CANONICALIZATION_METHOD>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetDigestMethod(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> { let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__) } pub unsafe fn GetDigestValue(&self, digestvalue: *mut *mut u8, count: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(digestvalue), ::core::mem::transmute(count)).ok() } } unsafe impl ::windows::core::Interface for IOpcSignatureReference { type Vtable = IOpcSignatureReference_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1b47005e_3011_4edc_be6f_0f65e5ab0342); } impl ::core::convert::From<IOpcSignatureReference> for ::windows::core::IUnknown { fn from(value: IOpcSignatureReference) -> Self { value.0 } } impl ::core::convert::From<&IOpcSignatureReference> for ::windows::core::IUnknown { fn from(value: &IOpcSignatureReference) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcSignatureReference { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcSignatureReference { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcSignatureReference_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, referenceid: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, referenceuri: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, r#type: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, transformmethod: *mut OPC_CANONICALIZATION_METHOD) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, digestmethod: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, digestvalue: *mut *mut u8, count: *mut u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcSignatureReferenceEnumerator(pub ::windows::core::IUnknown); impl IOpcSignatureReferenceEnumerator { #[cfg(feature = "Win32_Foundation")] pub unsafe fn MoveNext(&self) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn MovePrevious(&self) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } pub unsafe fn GetCurrent(&self) -> ::windows::core::Result<IOpcSignatureReference> { let mut result__: <IOpcSignatureReference as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignatureReference>(result__) } pub unsafe fn Clone(&self) -> ::windows::core::Result<IOpcSignatureReferenceEnumerator> { let mut result__: <IOpcSignatureReferenceEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignatureReferenceEnumerator>(result__) } } unsafe impl ::windows::core::Interface for IOpcSignatureReferenceEnumerator { type Vtable = IOpcSignatureReferenceEnumerator_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcfa59a45_28b1_4868_969e_fa8097fdc12a); } impl ::core::convert::From<IOpcSignatureReferenceEnumerator> for ::windows::core::IUnknown { fn from(value: IOpcSignatureReferenceEnumerator) -> Self { value.0 } } impl ::core::convert::From<&IOpcSignatureReferenceEnumerator> for ::windows::core::IUnknown { fn from(value: &IOpcSignatureReferenceEnumerator) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcSignatureReferenceEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcSignatureReferenceEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcSignatureReferenceEnumerator_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasnext: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasprevious: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, reference: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, copy: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcSignatureReferenceSet(pub ::windows::core::IUnknown); impl IOpcSignatureReferenceSet { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn Create<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::IUri>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>( &self, referenceuri: Param0, referenceid: Param1, r#type: Param2, digestmethod: Param3, transformmethod: OPC_CANONICALIZATION_METHOD, ) -> ::windows::core::Result<IOpcSignatureReference> { let mut result__: <IOpcSignatureReference as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), referenceuri.into_param().abi(), referenceid.into_param().abi(), r#type.into_param().abi(), digestmethod.into_param().abi(), ::core::mem::transmute(transformmethod), &mut result__).from_abi::<IOpcSignatureReference>(result__) } pub unsafe fn Delete<'a, Param0: ::windows::core::IntoParam<'a, IOpcSignatureReference>>(&self, reference: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), reference.into_param().abi()).ok() } pub unsafe fn GetEnumerator(&self) -> ::windows::core::Result<IOpcSignatureReferenceEnumerator> { let mut result__: <IOpcSignatureReferenceEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignatureReferenceEnumerator>(result__) } } unsafe impl ::windows::core::Interface for IOpcSignatureReferenceSet { type Vtable = IOpcSignatureReferenceSet_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf3b02d31_ab12_42dd_9e2f_2b16761c3c1e); } impl ::core::convert::From<IOpcSignatureReferenceSet> for ::windows::core::IUnknown { fn from(value: IOpcSignatureReferenceSet) -> Self { value.0 } } impl ::core::convert::From<&IOpcSignatureReferenceSet> for ::windows::core::IUnknown { fn from(value: &IOpcSignatureReferenceSet) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcSignatureReferenceSet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcSignatureReferenceSet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcSignatureReferenceSet_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, referenceuri: ::windows::core::RawPtr, referenceid: super::super::super::Foundation::PWSTR, r#type: super::super::super::Foundation::PWSTR, digestmethod: super::super::super::Foundation::PWSTR, transformmethod: OPC_CANONICALIZATION_METHOD, reference: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, reference: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, referenceenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcSignatureRelationshipReference(pub ::windows::core::IUnknown); impl IOpcSignatureRelationshipReference { pub unsafe fn GetSourceUri(&self) -> ::windows::core::Result<IOpcUri> { let mut result__: <IOpcUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcUri>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetDigestMethod(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> { let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__) } pub unsafe fn GetDigestValue(&self, digestvalue: *mut *mut u8, count: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(digestvalue), ::core::mem::transmute(count)).ok() } pub unsafe fn GetTransformMethod(&self) -> ::windows::core::Result<OPC_CANONICALIZATION_METHOD> { let mut result__: <OPC_CANONICALIZATION_METHOD as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<OPC_CANONICALIZATION_METHOD>(result__) } pub unsafe fn GetRelationshipSigningOption(&self) -> ::windows::core::Result<OPC_RELATIONSHIPS_SIGNING_OPTION> { let mut result__: <OPC_RELATIONSHIPS_SIGNING_OPTION as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<OPC_RELATIONSHIPS_SIGNING_OPTION>(result__) } pub unsafe fn GetRelationshipSelectorEnumerator(&self) -> ::windows::core::Result<IOpcRelationshipSelectorEnumerator> { let mut result__: <IOpcRelationshipSelectorEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcRelationshipSelectorEnumerator>(result__) } } unsafe impl ::windows::core::Interface for IOpcSignatureRelationshipReference { type Vtable = IOpcSignatureRelationshipReference_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x57babac6_9d4a_4e50_8b86_e5d4051eae7c); } impl ::core::convert::From<IOpcSignatureRelationshipReference> for ::windows::core::IUnknown { fn from(value: IOpcSignatureRelationshipReference) -> Self { value.0 } } impl ::core::convert::From<&IOpcSignatureRelationshipReference> for ::windows::core::IUnknown { fn from(value: &IOpcSignatureRelationshipReference) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcSignatureRelationshipReference { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcSignatureRelationshipReference { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcSignatureRelationshipReference_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, sourceuri: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, digestmethod: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, digestvalue: *mut *mut u8, count: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, transformmethod: *mut OPC_CANONICALIZATION_METHOD) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipsigningoption: *mut OPC_RELATIONSHIPS_SIGNING_OPTION) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, selectorenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcSignatureRelationshipReferenceEnumerator(pub ::windows::core::IUnknown); impl IOpcSignatureRelationshipReferenceEnumerator { #[cfg(feature = "Win32_Foundation")] pub unsafe fn MoveNext(&self) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn MovePrevious(&self) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } pub unsafe fn GetCurrent(&self) -> ::windows::core::Result<IOpcSignatureRelationshipReference> { let mut result__: <IOpcSignatureRelationshipReference as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignatureRelationshipReference>(result__) } pub unsafe fn Clone(&self) -> ::windows::core::Result<IOpcSignatureRelationshipReferenceEnumerator> { let mut result__: <IOpcSignatureRelationshipReferenceEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignatureRelationshipReferenceEnumerator>(result__) } } unsafe impl ::windows::core::Interface for IOpcSignatureRelationshipReferenceEnumerator { type Vtable = IOpcSignatureRelationshipReferenceEnumerator_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x773ba3e4_f021_48e4_aa04_9816db5d3495); } impl ::core::convert::From<IOpcSignatureRelationshipReferenceEnumerator> for ::windows::core::IUnknown { fn from(value: IOpcSignatureRelationshipReferenceEnumerator) -> Self { value.0 } } impl ::core::convert::From<&IOpcSignatureRelationshipReferenceEnumerator> for ::windows::core::IUnknown { fn from(value: &IOpcSignatureRelationshipReferenceEnumerator) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcSignatureRelationshipReferenceEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcSignatureRelationshipReferenceEnumerator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcSignatureRelationshipReferenceEnumerator_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasnext: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hasprevious: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipreference: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, copy: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcSignatureRelationshipReferenceSet(pub ::windows::core::IUnknown); impl IOpcSignatureRelationshipReferenceSet { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Create<'a, Param0: ::windows::core::IntoParam<'a, IOpcUri>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, IOpcRelationshipSelectorSet>>(&self, sourceuri: Param0, digestmethod: Param1, relationshipsigningoption: OPC_RELATIONSHIPS_SIGNING_OPTION, selectorset: Param3, transformmethod: OPC_CANONICALIZATION_METHOD) -> ::windows::core::Result<IOpcSignatureRelationshipReference> { let mut result__: <IOpcSignatureRelationshipReference as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), sourceuri.into_param().abi(), digestmethod.into_param().abi(), ::core::mem::transmute(relationshipsigningoption), selectorset.into_param().abi(), ::core::mem::transmute(transformmethod), &mut result__).from_abi::<IOpcSignatureRelationshipReference>(result__) } pub unsafe fn CreateRelationshipSelectorSet(&self) -> ::windows::core::Result<IOpcRelationshipSelectorSet> { let mut result__: <IOpcRelationshipSelectorSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcRelationshipSelectorSet>(result__) } pub unsafe fn Delete<'a, Param0: ::windows::core::IntoParam<'a, IOpcSignatureRelationshipReference>>(&self, relationshipreference: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), relationshipreference.into_param().abi()).ok() } pub unsafe fn GetEnumerator(&self) -> ::windows::core::Result<IOpcSignatureRelationshipReferenceEnumerator> { let mut result__: <IOpcSignatureRelationshipReferenceEnumerator as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignatureRelationshipReferenceEnumerator>(result__) } } unsafe impl ::windows::core::Interface for IOpcSignatureRelationshipReferenceSet { type Vtable = IOpcSignatureRelationshipReferenceSet_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9f863ca5_3631_404c_828d_807e0715069b); } impl ::core::convert::From<IOpcSignatureRelationshipReferenceSet> for ::windows::core::IUnknown { fn from(value: IOpcSignatureRelationshipReferenceSet) -> Self { value.0 } } impl ::core::convert::From<&IOpcSignatureRelationshipReferenceSet> for ::windows::core::IUnknown { fn from(value: &IOpcSignatureRelationshipReferenceSet) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcSignatureRelationshipReferenceSet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcSignatureRelationshipReferenceSet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcSignatureRelationshipReferenceSet_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, sourceuri: ::windows::core::RawPtr, digestmethod: super::super::super::Foundation::PWSTR, relationshipsigningoption: OPC_RELATIONSHIPS_SIGNING_OPTION, selectorset: ::windows::core::RawPtr, transformmethod: OPC_CANONICALIZATION_METHOD, relationshipreference: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, selectorset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipreference: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipreferenceenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcSigningOptions(pub ::windows::core::IUnknown); impl IOpcSigningOptions { #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetSignatureId(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> { let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetSignatureId<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, signatureid: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), signatureid.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetSignatureMethod(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> { let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetSignatureMethod<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, signaturemethod: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), signaturemethod.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetDefaultDigestMethod(&self) -> ::windows::core::Result<super::super::super::Foundation::PWSTR> { let mut result__: <super::super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::PWSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDefaultDigestMethod<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, digestmethod: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), digestmethod.into_param().abi()).ok() } pub unsafe fn GetCertificateEmbeddingOption(&self) -> ::windows::core::Result<OPC_CERTIFICATE_EMBEDDING_OPTION> { let mut result__: <OPC_CERTIFICATE_EMBEDDING_OPTION as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<OPC_CERTIFICATE_EMBEDDING_OPTION>(result__) } pub unsafe fn SetCertificateEmbeddingOption(&self, embeddingoption: OPC_CERTIFICATE_EMBEDDING_OPTION) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(embeddingoption)).ok() } pub unsafe fn GetTimeFormat(&self) -> ::windows::core::Result<OPC_SIGNATURE_TIME_FORMAT> { let mut result__: <OPC_SIGNATURE_TIME_FORMAT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<OPC_SIGNATURE_TIME_FORMAT>(result__) } pub unsafe fn SetTimeFormat(&self, timeformat: OPC_SIGNATURE_TIME_FORMAT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(timeformat)).ok() } pub unsafe fn GetSignaturePartReferenceSet(&self) -> ::windows::core::Result<IOpcSignaturePartReferenceSet> { let mut result__: <IOpcSignaturePartReferenceSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignaturePartReferenceSet>(result__) } pub unsafe fn GetSignatureRelationshipReferenceSet(&self) -> ::windows::core::Result<IOpcSignatureRelationshipReferenceSet> { let mut result__: <IOpcSignatureRelationshipReferenceSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignatureRelationshipReferenceSet>(result__) } pub unsafe fn GetCustomObjectSet(&self) -> ::windows::core::Result<IOpcSignatureCustomObjectSet> { let mut result__: <IOpcSignatureCustomObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignatureCustomObjectSet>(result__) } pub unsafe fn GetCustomReferenceSet(&self) -> ::windows::core::Result<IOpcSignatureReferenceSet> { let mut result__: <IOpcSignatureReferenceSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcSignatureReferenceSet>(result__) } pub unsafe fn GetCertificateSet(&self) -> ::windows::core::Result<IOpcCertificateSet> { let mut result__: <IOpcCertificateSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcCertificateSet>(result__) } pub unsafe fn GetSignaturePartName(&self) -> ::windows::core::Result<IOpcPartUri> { let mut result__: <IOpcPartUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcPartUri>(result__) } pub unsafe fn SetSignaturePartName<'a, Param0: ::windows::core::IntoParam<'a, IOpcPartUri>>(&self, signaturepartname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), signaturepartname.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IOpcSigningOptions { type Vtable = IOpcSigningOptions_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x50d2d6a5_7aeb_46c0_b241_43ab0e9b407e); } impl ::core::convert::From<IOpcSigningOptions> for ::windows::core::IUnknown { fn from(value: IOpcSigningOptions) -> Self { value.0 } } impl ::core::convert::From<&IOpcSigningOptions> for ::windows::core::IUnknown { fn from(value: &IOpcSigningOptions) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcSigningOptions { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcSigningOptions { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IOpcSigningOptions_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signatureid: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signatureid: super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signaturemethod: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signaturemethod: super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, digestmethod: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, digestmethod: super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, embeddingoption: *mut OPC_CERTIFICATE_EMBEDDING_OPTION) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, embeddingoption: OPC_CERTIFICATE_EMBEDDING_OPTION) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, timeformat: *mut OPC_SIGNATURE_TIME_FORMAT) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, timeformat: OPC_SIGNATURE_TIME_FORMAT) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, partreferenceset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipreferenceset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, customobjectset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, customreferenceset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, certificateset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signaturepartname: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, signaturepartname: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IOpcUri(pub ::windows::core::IUnknown); impl IOpcUri { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn GetPropertyBSTR(&self, uriprop: super::super::super::System::Com::Uri_PROPERTY, pbstrproperty: *mut super::super::super::Foundation::BSTR, dwflags: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(uriprop), ::core::mem::transmute(pbstrproperty), ::core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetPropertyLength(&self, uriprop: super::super::super::System::Com::Uri_PROPERTY, pcchproperty: *mut u32, dwflags: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(uriprop), ::core::mem::transmute(pcchproperty), ::core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetPropertyDWORD(&self, uriprop: super::super::super::System::Com::Uri_PROPERTY, pdwproperty: *mut u32, dwflags: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(uriprop), ::core::mem::transmute(pdwproperty), ::core::mem::transmute(dwflags)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn HasProperty(&self, uriprop: super::super::super::System::Com::Uri_PROPERTY) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(uriprop), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetAbsoluteUri(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetAuthority(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetDisplayUri(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetDomain(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetExtension(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetFragment(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetHost(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetPassword(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetPath(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetPathAndQuery(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetQuery(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetRawUri(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetSchemeName(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetUserInfo(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetUserName(&self) -> ::windows::core::Result<super::super::super::Foundation::BSTR> { let mut result__: <super::super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::super::Foundation::BSTR>(result__) } pub unsafe fn GetHostType(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } pub unsafe fn GetPort(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } pub unsafe fn GetScheme(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } pub unsafe fn GetZone(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } pub unsafe fn GetProperties(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn IsEqual<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::IUri>>(&self, puri: Param0) -> ::windows::core::Result<super::super::super::Foundation::BOOL> { let mut result__: <super::super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), puri.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::BOOL>(result__) } pub unsafe fn GetRelationshipsPartUri(&self) -> ::windows::core::Result<IOpcPartUri> { let mut result__: <IOpcPartUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IOpcPartUri>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetRelativeUri<'a, Param0: ::windows::core::IntoParam<'a, IOpcPartUri>>(&self, targetparturi: Param0) -> ::windows::core::Result<super::super::super::System::Com::IUri> { let mut result__: <super::super::super::System::Com::IUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), targetparturi.into_param().abi(), &mut result__).from_abi::<super::super::super::System::Com::IUri>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CombinePartUri<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::System::Com::IUri>>(&self, relativeuri: Param0) -> ::windows::core::Result<IOpcPartUri> { let mut result__: <IOpcPartUri as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), relativeuri.into_param().abi(), &mut result__).from_abi::<IOpcPartUri>(result__) } } unsafe impl ::windows::core::Interface for IOpcUri { type Vtable = IOpcUri_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbc9c1b9b_d62c_49eb_aef0_3b4e0b28ebed); } impl ::core::convert::From<IOpcUri> for ::windows::core::IUnknown { fn from(value: IOpcUri) -> Self { value.0 } } impl ::core::convert::From<&IOpcUri> for ::windows::core::IUnknown { fn from(value: &IOpcUri) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IOpcUri { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IOpcUri { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IOpcUri> for super::super::super::System::Com::IUri { fn from(value: IOpcUri) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IOpcUri> for super::super::super::System::Com::IUri { fn from(value: &IOpcUri) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::super::System::Com::IUri> for IOpcUri { fn into_param(self) -> ::windows::core::Param<'a, super::super::super::System::Com::IUri> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::super::System::Com::IUri> for &IOpcUri { fn into_param(self) -> ::windows::core::Param<'a, super::super::super::System::Com::IUri> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IOpcUri_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uriprop: super::super::super::System::Com::Uri_PROPERTY, pbstrproperty: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>, dwflags: u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uriprop: super::super::super::System::Com::Uri_PROPERTY, pcchproperty: *mut u32, dwflags: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uriprop: super::super::super::System::Com::Uri_PROPERTY, pdwproperty: *mut u32, dwflags: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uriprop: super::super::super::System::Com::Uri_PROPERTY, pfhasproperty: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrabsoluteuri: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrauthority: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrdisplaystring: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrdomain: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrextension: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrfragment: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrhost: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrpassword: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrpath: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrpathandquery: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrquery: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrrawuri: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrschemename: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstruserinfo: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrusername: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pdwhosttype: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pdwport: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pdwscheme: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pdwzone: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pdwflags: *mut u32) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, puri: ::windows::core::RawPtr, pfequal: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relationshipparturi: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, targetparturi: ::windows::core::RawPtr, relativeuri: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relativeuri: ::windows::core::RawPtr, combineduri: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, ); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct OPC_CANONICALIZATION_METHOD(pub i32); pub const OPC_CANONICALIZATION_NONE: OPC_CANONICALIZATION_METHOD = OPC_CANONICALIZATION_METHOD(0i32); pub const OPC_CANONICALIZATION_C14N: OPC_CANONICALIZATION_METHOD = OPC_CANONICALIZATION_METHOD(1i32); pub const OPC_CANONICALIZATION_C14N_WITH_COMMENTS: OPC_CANONICALIZATION_METHOD = OPC_CANONICALIZATION_METHOD(2i32); impl ::core::convert::From<i32> for OPC_CANONICALIZATION_METHOD { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for OPC_CANONICALIZATION_METHOD { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct OPC_CERTIFICATE_EMBEDDING_OPTION(pub i32); pub const OPC_CERTIFICATE_IN_CERTIFICATE_PART: OPC_CERTIFICATE_EMBEDDING_OPTION = OPC_CERTIFICATE_EMBEDDING_OPTION(0i32); pub const OPC_CERTIFICATE_IN_SIGNATURE_PART: OPC_CERTIFICATE_EMBEDDING_OPTION = OPC_CERTIFICATE_EMBEDDING_OPTION(1i32); pub const OPC_CERTIFICATE_NOT_EMBEDDED: OPC_CERTIFICATE_EMBEDDING_OPTION = OPC_CERTIFICATE_EMBEDDING_OPTION(2i32); impl ::core::convert::From<i32> for OPC_CERTIFICATE_EMBEDDING_OPTION { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for OPC_CERTIFICATE_EMBEDDING_OPTION { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct OPC_COMPRESSION_OPTIONS(pub i32); pub const OPC_COMPRESSION_NONE: OPC_COMPRESSION_OPTIONS = OPC_COMPRESSION_OPTIONS(-1i32); pub const OPC_COMPRESSION_NORMAL: OPC_COMPRESSION_OPTIONS = OPC_COMPRESSION_OPTIONS(0i32); pub const OPC_COMPRESSION_MAXIMUM: OPC_COMPRESSION_OPTIONS = OPC_COMPRESSION_OPTIONS(1i32); pub const OPC_COMPRESSION_FAST: OPC_COMPRESSION_OPTIONS = OPC_COMPRESSION_OPTIONS(2i32); pub const OPC_COMPRESSION_SUPERFAST: OPC_COMPRESSION_OPTIONS = OPC_COMPRESSION_OPTIONS(3i32); impl ::core::convert::From<i32> for OPC_COMPRESSION_OPTIONS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for OPC_COMPRESSION_OPTIONS { type Abi = Self; } pub const OPC_E_CONFLICTING_SETTINGS: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175212i32 as _); pub const OPC_E_COULD_NOT_RECOVER: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175154i32 as _); pub const OPC_E_DS_DEFAULT_DIGEST_METHOD_NOT_SET: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175161i32 as _); pub const OPC_E_DS_DIGEST_VALUE_ERROR: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175206i32 as _); pub const OPC_E_DS_DUPLICATE_PACKAGE_OBJECT_REFERENCES: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175187i32 as _); pub const OPC_E_DS_DUPLICATE_SIGNATURE_ORIGIN_RELATIONSHIP: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175205i32 as _); pub const OPC_E_DS_DUPLICATE_SIGNATURE_PROPERTY_ELEMENT: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175192i32 as _); pub const OPC_E_DS_EXTERNAL_SIGNATURE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175202i32 as _); pub const OPC_E_DS_EXTERNAL_SIGNATURE_REFERENCE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175185i32 as _); pub const OPC_E_DS_INVALID_CANONICALIZATION_METHOD: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175198i32 as _); pub const OPC_E_DS_INVALID_CERTIFICATE_RELATIONSHIP: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175203i32 as _); pub const OPC_E_DS_INVALID_OPC_SIGNATURE_TIME_FORMAT: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175196i32 as _); pub const OPC_E_DS_INVALID_RELATIONSHIPS_SIGNING_OPTION: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175197i32 as _); pub const OPC_E_DS_INVALID_RELATIONSHIP_TRANSFORM_XML: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175199i32 as _); pub const OPC_E_DS_INVALID_SIGNATURE_COUNT: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175189i32 as _); pub const OPC_E_DS_INVALID_SIGNATURE_ORIGIN_RELATIONSHIP: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175204i32 as _); pub const OPC_E_DS_INVALID_SIGNATURE_XML: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175190i32 as _); pub const OPC_E_DS_MISSING_CANONICALIZATION_TRANSFORM: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175182i32 as _); pub const OPC_E_DS_MISSING_CERTIFICATE_PART: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175146i32 as _); pub const OPC_E_DS_MISSING_PACKAGE_OBJECT_REFERENCE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175186i32 as _); pub const OPC_E_DS_MISSING_SIGNATURE_ALGORITHM: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175188i32 as _); pub const OPC_E_DS_MISSING_SIGNATURE_ORIGIN_PART: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175201i32 as _); pub const OPC_E_DS_MISSING_SIGNATURE_PART: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175200i32 as _); pub const OPC_E_DS_MISSING_SIGNATURE_PROPERTIES_ELEMENT: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175194i32 as _); pub const OPC_E_DS_MISSING_SIGNATURE_PROPERTY_ELEMENT: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175193i32 as _); pub const OPC_E_DS_MISSING_SIGNATURE_TIME_PROPERTY: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175191i32 as _); pub const OPC_E_DS_MULTIPLE_RELATIONSHIP_TRANSFORMS: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175183i32 as _); pub const OPC_E_DS_PACKAGE_REFERENCE_URI_RESERVED: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175195i32 as _); pub const OPC_E_DS_REFERENCE_MISSING_CONTENT_TYPE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175184i32 as _); pub const OPC_E_DS_SIGNATURE_CORRUPT: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175207i32 as _); pub const OPC_E_DS_SIGNATURE_METHOD_NOT_SET: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175162i32 as _); pub const OPC_E_DS_SIGNATURE_ORIGIN_EXISTS: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175148i32 as _); pub const OPC_E_DS_SIGNATURE_PROPERTY_MISSING_TARGET: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175163i32 as _); pub const OPC_E_DS_SIGNATURE_REFERENCE_MISSING_URI: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175165i32 as _); pub const OPC_E_DS_UNSIGNED_PACKAGE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175147i32 as _); pub const OPC_E_DUPLICATE_DEFAULT_EXTENSION: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175217i32 as _); pub const OPC_E_DUPLICATE_OVERRIDE_PART: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175219i32 as _); pub const OPC_E_DUPLICATE_PART: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175221i32 as _); pub const OPC_E_DUPLICATE_PIECE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175211i32 as _); pub const OPC_E_DUPLICATE_RELATIONSHIP: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175213i32 as _); pub const OPC_E_ENUM_CANNOT_MOVE_NEXT: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175151i32 as _); pub const OPC_E_ENUM_CANNOT_MOVE_PREVIOUS: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175150i32 as _); pub const OPC_E_ENUM_COLLECTION_CHANGED: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175152i32 as _); pub const OPC_E_ENUM_INVALID_POSITION: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175149i32 as _); pub const OPC_E_INVALID_CONTENT_TYPE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175164i32 as _); pub const OPC_E_INVALID_CONTENT_TYPE_XML: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175226i32 as _); pub const OPC_E_INVALID_DEFAULT_EXTENSION: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175218i32 as _); pub const OPC_E_INVALID_OVERRIDE_PART_NAME: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175220i32 as _); pub const OPC_E_INVALID_PIECE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175210i32 as _); pub const OPC_E_INVALID_RELATIONSHIP_ID: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175216i32 as _); pub const OPC_E_INVALID_RELATIONSHIP_TARGET: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175214i32 as _); pub const OPC_E_INVALID_RELATIONSHIP_TARGET_MODE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175155i32 as _); pub const OPC_E_INVALID_RELATIONSHIP_TYPE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175215i32 as _); pub const OPC_E_INVALID_RELS_XML: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175222i32 as _); pub const OPC_E_INVALID_XML_ENCODING: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175166i32 as _); pub const OPC_E_MC_INCONSISTENT_PRESERVE_ATTRIBUTES: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175157i32 as _); pub const OPC_E_MC_INCONSISTENT_PRESERVE_ELEMENTS: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175156i32 as _); pub const OPC_E_MC_INCONSISTENT_PROCESS_CONTENT: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175158i32 as _); pub const OPC_E_MC_INVALID_ATTRIBUTES_ON_IGNORABLE_ELEMENT: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175168i32 as _); pub const OPC_E_MC_INVALID_ENUM_TYPE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175172i32 as _); pub const OPC_E_MC_INVALID_PREFIX_LIST: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175177i32 as _); pub const OPC_E_MC_INVALID_QNAME_LIST: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175176i32 as _); pub const OPC_E_MC_INVALID_XMLNS_ATTRIBUTE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175167i32 as _); pub const OPC_E_MC_MISSING_CHOICE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175173i32 as _); pub const OPC_E_MC_MISSING_REQUIRES_ATTR: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175179i32 as _); pub const OPC_E_MC_MULTIPLE_FALLBACK_ELEMENTS: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175159i32 as _); pub const OPC_E_MC_NESTED_ALTERNATE_CONTENT: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175175i32 as _); pub const OPC_E_MC_UNEXPECTED_ATTR: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175178i32 as _); pub const OPC_E_MC_UNEXPECTED_CHOICE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175174i32 as _); pub const OPC_E_MC_UNEXPECTED_ELEMENT: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175181i32 as _); pub const OPC_E_MC_UNEXPECTED_REQUIRES_ATTR: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175180i32 as _); pub const OPC_E_MC_UNKNOWN_NAMESPACE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175170i32 as _); pub const OPC_E_MC_UNKNOWN_PREFIX: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175169i32 as _); pub const OPC_E_MISSING_CONTENT_TYPES: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175225i32 as _); pub const OPC_E_MISSING_PIECE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175209i32 as _); pub const OPC_E_NONCONFORMING_CONTENT_TYPES_XML: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175224i32 as _); pub const OPC_E_NONCONFORMING_RELS_XML: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175223i32 as _); pub const OPC_E_NONCONFORMING_URI: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175231i32 as _); pub const OPC_E_NO_SUCH_PART: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175208i32 as _); pub const OPC_E_NO_SUCH_RELATIONSHIP: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175160i32 as _); pub const OPC_E_NO_SUCH_SETTINGS: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175145i32 as _); pub const OPC_E_PART_CANNOT_BE_DIRECTORY: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175228i32 as _); pub const OPC_E_RELATIONSHIP_URI_REQUIRED: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175229i32 as _); pub const OPC_E_RELATIVE_URI_REQUIRED: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175230i32 as _); pub const OPC_E_UNEXPECTED_CONTENT_TYPE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175227i32 as _); pub const OPC_E_UNSUPPORTED_PACKAGE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142175153i32 as _); pub const OPC_E_ZIP_CENTRAL_DIRECTORY_TOO_LARGE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142171127i32 as _); pub const OPC_E_ZIP_COMMENT_TOO_LARGE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142171124i32 as _); pub const OPC_E_ZIP_COMPRESSION_FAILED: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142171133i32 as _); pub const OPC_E_ZIP_CORRUPTED_ARCHIVE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142171134i32 as _); pub const OPC_E_ZIP_DECOMPRESSION_FAILED: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142171132i32 as _); pub const OPC_E_ZIP_DUPLICATE_NAME: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142171125i32 as _); pub const OPC_E_ZIP_EXTRA_FIELDS_TOO_LARGE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142171123i32 as _); pub const OPC_E_ZIP_FILE_HEADER_TOO_LARGE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142171122i32 as _); pub const OPC_E_ZIP_INCONSISTENT_DIRECTORY: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142171130i32 as _); pub const OPC_E_ZIP_INCONSISTENT_FILEITEM: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142171131i32 as _); pub const OPC_E_ZIP_INCORRECT_DATA_SIZE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142171135i32 as _); pub const OPC_E_ZIP_MISSING_DATA_DESCRIPTOR: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142171129i32 as _); pub const OPC_E_ZIP_MISSING_END_OF_CENTRAL_DIRECTORY: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142171121i32 as _); pub const OPC_E_ZIP_NAME_TOO_LARGE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142171126i32 as _); pub const OPC_E_ZIP_REQUIRES_64_BIT: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142171120i32 as _); pub const OPC_E_ZIP_UNSUPPORTEDARCHIVE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2142171128i32 as _); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct OPC_READ_FLAGS(pub u32); pub const OPC_READ_DEFAULT: OPC_READ_FLAGS = OPC_READ_FLAGS(0u32); pub const OPC_VALIDATE_ON_LOAD: OPC_READ_FLAGS = OPC_READ_FLAGS(1u32); pub const OPC_CACHE_ON_ACCESS: OPC_READ_FLAGS = OPC_READ_FLAGS(2u32); impl ::core::convert::From<u32> for OPC_READ_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for OPC_READ_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for OPC_READ_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for OPC_READ_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for OPC_READ_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for OPC_READ_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for OPC_READ_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct OPC_RELATIONSHIPS_SIGNING_OPTION(pub i32); pub const OPC_RELATIONSHIP_SIGN_USING_SELECTORS: OPC_RELATIONSHIPS_SIGNING_OPTION = OPC_RELATIONSHIPS_SIGNING_OPTION(0i32); pub const OPC_RELATIONSHIP_SIGN_PART: OPC_RELATIONSHIPS_SIGNING_OPTION = OPC_RELATIONSHIPS_SIGNING_OPTION(1i32); impl ::core::convert::From<i32> for OPC_RELATIONSHIPS_SIGNING_OPTION { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for OPC_RELATIONSHIPS_SIGNING_OPTION { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct OPC_RELATIONSHIP_SELECTOR(pub i32); pub const OPC_RELATIONSHIP_SELECT_BY_ID: OPC_RELATIONSHIP_SELECTOR = OPC_RELATIONSHIP_SELECTOR(0i32); pub const OPC_RELATIONSHIP_SELECT_BY_TYPE: OPC_RELATIONSHIP_SELECTOR = OPC_RELATIONSHIP_SELECTOR(1i32); impl ::core::convert::From<i32> for OPC_RELATIONSHIP_SELECTOR { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for OPC_RELATIONSHIP_SELECTOR { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct OPC_SIGNATURE_TIME_FORMAT(pub i32); pub const OPC_SIGNATURE_TIME_FORMAT_MILLISECONDS: OPC_SIGNATURE_TIME_FORMAT = OPC_SIGNATURE_TIME_FORMAT(0i32); pub const OPC_SIGNATURE_TIME_FORMAT_SECONDS: OPC_SIGNATURE_TIME_FORMAT = OPC_SIGNATURE_TIME_FORMAT(1i32); pub const OPC_SIGNATURE_TIME_FORMAT_MINUTES: OPC_SIGNATURE_TIME_FORMAT = OPC_SIGNATURE_TIME_FORMAT(2i32); pub const OPC_SIGNATURE_TIME_FORMAT_DAYS: OPC_SIGNATURE_TIME_FORMAT = OPC_SIGNATURE_TIME_FORMAT(3i32); pub const OPC_SIGNATURE_TIME_FORMAT_MONTHS: OPC_SIGNATURE_TIME_FORMAT = OPC_SIGNATURE_TIME_FORMAT(4i32); pub const OPC_SIGNATURE_TIME_FORMAT_YEARS: OPC_SIGNATURE_TIME_FORMAT = OPC_SIGNATURE_TIME_FORMAT(5i32); impl ::core::convert::From<i32> for OPC_SIGNATURE_TIME_FORMAT { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for OPC_SIGNATURE_TIME_FORMAT { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct OPC_SIGNATURE_VALIDATION_RESULT(pub i32); pub const OPC_SIGNATURE_VALID: OPC_SIGNATURE_VALIDATION_RESULT = OPC_SIGNATURE_VALIDATION_RESULT(0i32); pub const OPC_SIGNATURE_INVALID: OPC_SIGNATURE_VALIDATION_RESULT = OPC_SIGNATURE_VALIDATION_RESULT(-1i32); impl ::core::convert::From<i32> for OPC_SIGNATURE_VALIDATION_RESULT { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for OPC_SIGNATURE_VALIDATION_RESULT { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct OPC_STREAM_IO_MODE(pub i32); pub const OPC_STREAM_IO_READ: OPC_STREAM_IO_MODE = OPC_STREAM_IO_MODE(1i32); pub const OPC_STREAM_IO_WRITE: OPC_STREAM_IO_MODE = OPC_STREAM_IO_MODE(2i32); impl ::core::convert::From<i32> for OPC_STREAM_IO_MODE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for OPC_STREAM_IO_MODE { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct OPC_URI_TARGET_MODE(pub i32); pub const OPC_URI_TARGET_MODE_INTERNAL: OPC_URI_TARGET_MODE = OPC_URI_TARGET_MODE(0i32); pub const OPC_URI_TARGET_MODE_EXTERNAL: OPC_URI_TARGET_MODE = OPC_URI_TARGET_MODE(1i32); impl ::core::convert::From<i32> for OPC_URI_TARGET_MODE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for OPC_URI_TARGET_MODE { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct OPC_WRITE_FLAGS(pub u32); pub const OPC_WRITE_DEFAULT: OPC_WRITE_FLAGS = OPC_WRITE_FLAGS(0u32); pub const OPC_WRITE_FORCE_ZIP32: OPC_WRITE_FLAGS = OPC_WRITE_FLAGS(1u32); impl ::core::convert::From<u32> for OPC_WRITE_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for OPC_WRITE_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for OPC_WRITE_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for OPC_WRITE_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for OPC_WRITE_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for OPC_WRITE_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for OPC_WRITE_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const OpcFactory: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6b2d6ba0_9f3e_4f27_920b_313cc426a39e);
//! Modify the list of `ComponentEntry` objects in a `DataBase`. // This module is a bit of a mess. use error::{GrafenCliError, UIResult, UIErrorKind}; use ui::utils::{MenuResult, get_value_from_user, print_description, print_list_description_short, remove_items, reorder_list, select_command, select_direction, select_item}; use grafen::coord::{Coord, Direction}; use grafen::database::ComponentEntry; use grafen::database::ComponentEntry::*; use grafen::describe::Describe; use grafen::surface; use grafen::surface::{CylinderCap, LatticeType, Sides}; use grafen::system::Residue; use grafen::volume; use dialoguer::Checkboxes; use std::error::Error; use std::fmt::Write; use std::result; pub fn user_menu(mut component_list: &mut Vec<ComponentEntry>, residue_list: &[Residue]) -> MenuResult { let components_backup = component_list.clone(); create_menu![ @pre: { print_list_description_short("Component definitions", &component_list); }; AddComponent, "Create a component definition" => { new_component(&residue_list) .map(|component| { component_list.push(component); Some("Successfully created component definition".to_string()) }) .map_err(|_| GrafenCliError::RunError( "Could not create component definition".to_string() )) }, RemoveComponent, "Remove a component definition" => { remove_items(&mut component_list) .map(|_| None) .map_err(|err| GrafenCliError::RunError( format!("Could not remove a component: {}", err.description()) )) }, ReorderList, "Reorder component definition list" => { reorder_list(&mut component_list) .map(|_| None) .map_err(|err| GrafenCliError::RunError( format!("Could not reorder the list: {}", err.description()) )) }, QuitAndSave, "Finish editing component definition list" => { return Ok(Some("Finished editing component definition list".to_string())); }, QuitWithoutSaving, "Abort and discard changes" => { *component_list = components_backup; return Ok(Some("Discarding changes to component definition list".to_string())); } ]; } #[derive(Clone, Copy, Debug)] /// Available component types. enum ComponentSelect { Sheet, Cylinder, Cuboid, Abort, } use self::ComponentSelect::*; /// This menu changes the main component type and then calls that type's construction menu. fn new_component(residue_list: &[Residue]) -> UIResult<ComponentEntry> { loop { let component_type = select_component_type()?; let result = match component_type { Sheet => create_sheet(&residue_list), Cylinder => create_cylinder(&residue_list), Cuboid => create_cuboid(&residue_list), Abort => return Err(UIErrorKind::Abort), }; match result { // All is good! Ok(component) => return Ok(component), // User asked to change a component. Err(ChangeOrError::ChangeComponent) => (), // User aborted the component creation. Err(ChangeOrError::Error(UIErrorKind::Abort)) => return Err(UIErrorKind::Abort), // Something went wrong when constructing a component. Reloop the menu. Err(ChangeOrError::Error(_)) => eprintln!("could not create component"), } } } fn select_component_type() -> UIResult<ComponentSelect> { let (choices, item_texts) = create_menu_items![ (Sheet, "Sheet"), (Cylinder, "Cylinder"), (Cuboid, "Cuboid box"), (Abort, "(Abort)") ]; eprintln!("Component type:"); select_command(item_texts, choices).map_err(|err| UIErrorKind::from(err)) } /// Error enum to handle the case when we return to a previous menu to change a component, /// not because an error was encountered. enum ChangeOrError { ChangeComponent, Error(UIErrorKind), } impl From<UIErrorKind> for ChangeOrError { fn from(err: UIErrorKind) -> ChangeOrError { ChangeOrError::Error(err) } } #[derive(Clone, Copy, Debug, PartialEq)] /// Types of components to construct. enum ComponentType { Surface, Volume, } use self::ComponentType::*; /********************** * Sheet construction * **********************/ /// Use a builder to get all value before constructing the component. struct SheetBuilder { name: String, lattice: LatticeType, residue: Residue, normal: Direction, std_z: Option<f64>, } impl SheetBuilder { fn initialize(residue_list: &[Residue]) -> UIResult<SheetBuilder> { let lattice = select_lattice()?; eprintln!("Residue:"); let residue = select_residue(&residue_list)?; let normal = select_direction(Some("Sheet normal axis"), None)?; Ok(SheetBuilder { name: String::new(), lattice, residue, normal, std_z: None, }) } fn finalize(&self) -> result::Result<ComponentEntry, &str> { if self.name.is_empty() { return Err("Cannot add component: No name is set") } else { Ok(SurfaceSheet(surface::Sheet { name: Some(self.name.clone()), residue: Some(self.residue.clone()), lattice: self.lattice.clone(), std_z: self.std_z, origin: Coord::default(), normal: self.normal, length: 0.0, width: 0.0, coords: vec![], })) } } } impl Describe for SheetBuilder { fn describe(&self) -> String { let mut description = String::new(); const ERR: &'static str = "could not construct a string"; writeln!(description, "Name: {}", &self.name).expect(ERR); writeln!(description, "Lattice: {:?}", &self.lattice).expect(ERR); writeln!(description, "Normal: {}", &self.normal).expect(ERR); writeln!(description, "Residue: {}", &self.residue.code).expect(ERR); writeln!(description, "Z-variance: {}", &self.std_z.unwrap_or(0.0)).expect(ERR); description } fn describe_short(&self) -> String { self.describe() } } #[derive(Clone, Copy, Debug)] enum SheetMenu { ChangeComponent, SetName, SetLattice, SetNormal, SetResidue, SetVarianceZ, QuitAndSave, QuitWithoutSaving, } fn create_sheet(residue_list: &[Residue]) -> result::Result<ComponentEntry, ChangeOrError> { use self::SheetMenu::*; let (commands, item_texts) = create_menu_items![ (ChangeComponent, "Change component type"), (SetName, "Set name"), (SetResidue, "Set residue"), (SetLattice, "Set lattice"), (SetNormal, "Set normal vector direction"), (SetVarianceZ, "Set variance of residue positions along z"), (QuitAndSave, "Finalize component definition and return"), (QuitWithoutSaving, "Abort") ]; let mut builder = SheetBuilder::initialize(&residue_list)?; loop { eprintln!("{}", builder.describe()); let command = select_command(item_texts, commands).map_err(|err| UIErrorKind::from(err))?; match command { ChangeComponent => return Err(ChangeOrError::ChangeComponent), SetName => match get_value_from_user::<String>("Component name") { Ok(new_name) => { builder.name = new_name; }, Err(_) => { eprintln!("error: Could not read name"); }, }, SetResidue => match select_residue(&residue_list) { Ok(new_residue) => { builder.residue = new_residue; }, Err(_) => eprintln!("error: Could not select new residue"), }, SetLattice => match select_lattice() { Ok(new_lattice) => { builder.lattice = new_lattice; }, Err(_) => eprintln!("error: Could not select new lattice"), }, SetNormal => match select_direction(Some("Sheet normal axis"), None) { Ok(new_direction) => { builder.normal = new_direction; }, Err(_) => eprintln!("error: Could not select new direction"), }, SetVarianceZ => match get_variance() { Ok(new_std_z) => { builder.std_z = new_std_z; }, Err(_) => eprintln!("error: Could not read new variance"), }, QuitAndSave => match builder.finalize() { Ok(component) => return Ok(component), Err(msg) => eprintln!("{}", msg), }, QuitWithoutSaving => return Err(ChangeOrError::Error(UIErrorKind::Abort)), } } } fn get_variance() -> UIResult<Option<f64>> { let std = get_value_from_user::<f64>("Standard deviation 'σ' of distribution (nm)")?; if std == 0.0 { Ok(None) } else { Ok(Some(std)) } } /************************* * Cylinder construction * *************************/ struct CylinderBuilder { name: String, cylinder_type: ComponentType, lattice: Option<LatticeType>, residue: Residue, density: Option<f64>, cap: Option<CylinderCap>, alignment: Direction, } impl CylinderBuilder { fn initialize(residue_list: &[Residue]) -> UIResult<CylinderBuilder> { let cylinder_type = select_cylinder_type()?; let residue = select_residue(&residue_list)?; let lattice = if cylinder_type == Surface { Some(select_lattice()?) } else { None }; Ok(CylinderBuilder { name: String::new(), cylinder_type, lattice, residue, density: None, cap: None, alignment: Direction::Z, }) } fn finalize(&self) -> result::Result<ComponentEntry, &str> { if self.name.is_empty() { return Err("Cannot add component: No name is set") } else { match self.cylinder_type { Surface => { Ok(SurfaceCylinder(surface::Cylinder { name: Some(self.name.clone()), residue: Some(self.residue.clone()), lattice: self.lattice.unwrap(), alignment: self.alignment, cap: self.cap, origin: Coord::default(), radius: 0.0, height: 0.0, coords: vec![], })) }, Volume => { Ok(VolumeCylinder(volume::Cylinder { name: Some(self.name.clone()), residue: Some(self.residue.clone()), alignment: self.alignment, origin: Coord::default(), radius: 0.0, height: 0.0, density: self.density, coords: vec![], })) }, } } } } impl Describe for CylinderBuilder { fn describe(&self) -> String { let mut description = String::new(); const ERR: &'static str = "could not construct a string"; writeln!(description, "Name: {}", &self.name).expect(ERR); match self.cylinder_type { Surface => { writeln!(description, "Type: Cylinder Surface").expect(ERR); let lattice_string = match self.lattice { Some(lattice) => format!("{:?}", lattice), None => "".into(), }; writeln!(description, "Lattice: {}", lattice_string).expect(ERR); writeln!(description, "Residue: {}", self.residue.code).expect(ERR); let cap_string = self.cap .map(|cap| format!("{}", cap)) .unwrap_or("None".to_string()); writeln!(description, "Cap: {}", cap_string).expect(ERR); }, Volume => { writeln!(description, "Type: Cylinder Volume").expect(ERR); writeln!(description, "Residue: {}", self.residue.code).expect(ERR); let density_string = self.density .map(|dens| format!("{}", dens)) .unwrap_or("None".into()); writeln!(description, "Density: {}", density_string).expect(ERR); }, } writeln!(description, "Alignment: {}", self.alignment).expect(ERR); description } fn describe_short(&self) -> String { self.describe() } } #[derive(Clone, Copy, Debug)] enum CylinderSurfaceMenu { ChangeComponent, ChangeCylinderType, SetName, SetResidue, SetCap, SetAlignment, QuitAndSave, QuitWithoutSaving, } #[derive(Clone, Copy, Debug)] enum CylinderVolumeMenu { ChangeComponent, ChangeCylinderType, SetName, SetResidue, SetDensity, SetAlignment, QuitAndSave, QuitWithoutSaving, } fn create_cylinder(residue_list: &[Residue]) -> result::Result<ComponentEntry, ChangeOrError> { let mut builder = CylinderBuilder::initialize(&residue_list)?; loop { print_description(&builder); // Always match against the type to select the correct menu match builder.cylinder_type { Surface => { use self::CylinderSurfaceMenu::*; // These are statically compiled so we can keep the construction in this loop let (surface_commands, surface_texts) = create_menu_items![ (ChangeComponent, "Change component type"), (ChangeCylinderType, "Change cylinder type"), (SetName, "Set name"), (SetResidue, "Set residue"), (SetCap, "Cap either cylinder edge"), (SetAlignment, "Set cylinder normal axis"), (QuitAndSave, "Finalize component definition and return"), (QuitWithoutSaving, "Abort") ]; let command = select_command(surface_texts, surface_commands) .map_err(|err| UIErrorKind::from(err))?; match command { ChangeComponent => return Err(ChangeOrError::ChangeComponent), ChangeCylinderType => match select_cylinder_type() { Ok(new_type) => { let lattice = if new_type == Surface { Some(select_lattice()?) } else { None }; builder.cylinder_type = new_type; builder.lattice = lattice; }, Err(_) => eprintln!("error: Could not select new cylinder type"), }, SetName => match get_value_from_user::<String>("Component name") { Ok(new_name) => { builder.name = new_name; }, Err(_) => { eprintln!("error: Could not read name"); }, }, SetResidue => match select_residue(&residue_list) { Ok(new_residue) => { builder.residue = new_residue; }, Err(_) => eprintln!("error: Could not select new residue"), }, SetCap => match select_cap() { Ok(new_cap) => { builder.cap = new_cap; }, Err(_) => eprintln!("error: Could not select new cap"), }, SetAlignment => match select_direction(Some("Cylinder normal axis"), None) { Ok(new_direction) => { builder.alignment = new_direction; }, Err(_) => eprintln!("error: Could not select new direction"), }, QuitAndSave => match builder.finalize() { Ok(component) => return Ok(component), Err(msg) => eprintln!("{}", msg), }, QuitWithoutSaving => return Err(ChangeOrError::Error(UIErrorKind::Abort)), } }, Volume => { use self::CylinderVolumeMenu::*; // These are statically compiled so we can keep the construction in this loop let (volume_commands, volume_texts) = create_menu_items![ (ChangeComponent, "Change component type"), (ChangeCylinderType, "Change cylinder type"), (SetName, "Set name"), (SetResidue, "Set residue"), (SetDensity, "Set default density"), (SetAlignment, "Set cylinder normal axis"), (QuitAndSave, "Finalize component definition and return"), (QuitWithoutSaving, "Abort") ]; let command = select_command(volume_texts, volume_commands) .map_err(|err| UIErrorKind::from(err))?; match command { ChangeComponent => return Err(ChangeOrError::ChangeComponent), ChangeCylinderType => match select_cylinder_type() { Ok(new_type) => { let lattice = if new_type == Surface { Some(select_lattice()?) } else { None }; builder.cylinder_type = new_type; builder.lattice = lattice; }, Err(_) => eprintln!("error: Could not select new cylinder type"), }, SetName => match get_value_from_user::<String>("Component name") { Ok(new_name) => { builder.name = new_name; }, Err(_) => { eprintln!("error: Could not read name"); }, }, SetResidue => match select_residue(&residue_list) { Ok(new_residue) => { builder.residue = new_residue; }, Err(_) => eprintln!("error: Could not select new residue"), }, SetDensity => match get_density() { Ok(density) => { builder.density = density; }, Err(_) => eprintln!("error: Could not set density"), }, SetAlignment => match select_direction(Some("Cylinder normal axis"), None) { Ok(new_direction) => { builder.alignment = new_direction; }, Err(_) => eprintln!("error: Could not select new direction"), }, QuitAndSave => match builder.finalize() { Ok(component) => return Ok(component), Err(msg) => eprintln!("{}", msg), }, QuitWithoutSaving => return Err(ChangeOrError::Error(UIErrorKind::Abort)), } }, } eprintln!(""); } } fn select_cylinder_type() -> UIResult<ComponentType> { let (classes, item_texts) = create_menu_items![ (Surface, "Surface"), (Volume, "Volume") ]; select_command(item_texts, classes) } fn select_cap() -> UIResult<Option<CylinderCap>> { let choices = &[ "Bottom", "Top" ]; eprintln!("Set caps on cylinder sides ([space] select, [enter] confirm):"); let selections = Checkboxes::new().items(choices).interact()?; match (selections.contains(&0), selections.contains(&1)) { (true, true) => Ok(Some(CylinderCap::Both)), (true, false) => Ok(Some(CylinderCap::Bottom)), (false, true) => Ok(Some(CylinderCap::Top)), _ => Ok(None), } } /*********************** * Cuboid construction * ***********************/ struct CuboidBuilder { name: String, cuboid_type: ComponentType, residue: Residue, density: Option<f64>, lattice: Option<LatticeType>, sides: Option<Sides>, } impl CuboidBuilder { fn initialize(residue_list: &[Residue]) -> UIResult<CuboidBuilder> { let cuboid_type = select_cylinder_type()?; let residue = select_residue(&residue_list)?; let lattice = if cuboid_type == Surface { Some(select_lattice()?) } else { None }; Ok(CuboidBuilder { name: String::new(), cuboid_type, residue, density: None, lattice, sides: Some(Sides::all()), }) } fn finalize(&self) -> result::Result<ComponentEntry, &str> { match self.cuboid_type { ComponentType::Volume => { if self.name.is_empty() { return Err("Cannot add component: No name is set") } else { Ok(VolumeCuboid(volume::Cuboid { name: Some(self.name.clone()), residue: Some(self.residue.clone()), density: self.density.clone(), .. volume::Cuboid::default() })) } }, ComponentType::Surface => { if self.name.is_empty() { return Err("Cannot add component: No name is set") } else if self.lattice.is_none() { return Err("Cannot add component: No lattice is set") } else { Ok(SurfaceCuboid(surface::Cuboid { name: Some(self.name.clone()), residue: Some(self.residue.clone()), lattice: self.lattice.unwrap().clone(), std_z: None, origin: Coord::ORIGO, size: Coord::ORIGO, sides: self.sides.unwrap_or(Sides::all()), coords: Vec::new(), })) } } } } } impl Describe for CuboidBuilder { fn describe(&self) -> String { let mut description = String::new(); const ERR: &'static str = "could not construct a string"; writeln!(description, "Name: {}", &self.name).expect(ERR); match self.cuboid_type { Surface => { writeln!(description, "Type: Cuboid Surface").expect(ERR); let lattice_string = match self.lattice { Some(lattice) => format!("{:?}", lattice), None => "".into(), }; writeln!(description, "Lattice: {}", lattice_string).expect(ERR); writeln!(description, "Residue: {}", self.residue.code).expect(ERR); writeln!(description, "Sides: {}", self.sides.unwrap_or(Sides::all())).expect(ERR); }, Volume => { writeln!(description, "Type: Cuboid Volume").expect(ERR); writeln!(description, "Residue: {}", self.residue.code).expect(ERR); let density_string = self.density .map(|dens| format!("{}", dens)) .unwrap_or("None".into()); writeln!(description, "Density: {}", density_string).expect(ERR); }, } description } fn describe_short(&self) -> String { self.describe() } } #[derive(Clone, Copy, Debug)] enum CuboidMenu { ChangeComponent, ChangeCuboidType, SetName, SetResidue, SetDensity, QuitAndSave, QuitWithoutSaving, } #[derive(Clone, Copy, Debug)] enum CuboidSurfaceMenu { ChangeComponent, ChangeCuboidType, SetName, SetResidue, SetSides, QuitAndSave, QuitWithoutSaving, } fn create_cuboid(residue_list: &[Residue]) -> result::Result<ComponentEntry, ChangeOrError> { let mut builder = CuboidBuilder::initialize(&residue_list)?; loop { print_description(&builder); match builder.cuboid_type { Surface => { use self::CuboidSurfaceMenu::*; let (surface_commands, surface_texts) = create_menu_items![ (ChangeComponent, "Change component type"), (ChangeCuboidType, "Change cuboid type"), (SetName, "Set name"), (SetResidue, "Set residue"), (SetSides, "Set which sides of the cuboid to construct"), (QuitAndSave, "Finalize component definition and return"), (QuitWithoutSaving, "Abort") ]; let command = select_command(surface_texts, surface_commands) .map_err(|err| UIErrorKind::from(err))?; match command { ChangeComponent => return Err(ChangeOrError::ChangeComponent), ChangeCuboidType => match select_cylinder_type() { Ok(new_type) => { let lattice = if new_type == Surface { Some(select_lattice()?) } else { None }; builder.cuboid_type = new_type; builder.lattice = lattice; }, Err(_) => eprintln!("error: Could not select new cylinder type"), }, SetName => match get_value_from_user::<String>("Component name") { Ok(new_name) => { builder.name = new_name; }, Err(_) => { eprintln!("error: Could not read name"); }, }, SetResidue => match select_residue(&residue_list) { Ok(new_residue) => { builder.residue = new_residue; }, Err(_) => eprintln!("error: Could not select new residue"), }, SetSides => match select_sides() { Ok(sides) => builder.sides = Some(sides), Err(_) => eprintln!("error: Could not select sides"), }, QuitAndSave => match builder.finalize() { Ok(component) => return Ok(component), Err(msg) => eprintln!("{}", msg), }, QuitWithoutSaving => return Err(ChangeOrError::Error(UIErrorKind::Abort)), } }, Volume => { use self::CuboidMenu::*; let (commands, item_texts) = create_menu_items![ (ChangeComponent, "Change component type"), (ChangeCuboidType, "Change cuboid type"), (SetName, "Set name"), (SetResidue, "Set residue"), (SetDensity, "Set default density"), (QuitAndSave, "Finalize component definition and return"), (QuitWithoutSaving, "Abort") ]; let command = select_command(item_texts, commands) .map_err(|err| UIErrorKind::from(err))?; match command { ChangeComponent => return Err(ChangeOrError::ChangeComponent), ChangeCuboidType => match select_cylinder_type() { Ok(new_type) => { let lattice = if new_type == Surface { Some(select_lattice()?) } else { None }; builder.cuboid_type = new_type; builder.lattice = lattice; }, Err(_) => eprintln!("error: Could not select new cylinder type"), }, SetName => match get_value_from_user::<String>("Component name") { Ok(new_name) => { builder.name = new_name; }, Err(_) => { eprintln!("error: Could not read name"); }, }, SetResidue => match select_residue(&residue_list) { Ok(new_residue) => { builder.residue = new_residue; }, Err(_) => eprintln!("error: Could not select new residue"), }, SetDensity => match get_density() { Ok(density) => { builder.density = density; }, Err(_) => eprintln!("error: Could not set density"), }, QuitAndSave => match builder.finalize() { Ok(component) => return Ok(component), Err(msg) => eprintln!("{}", msg), }, QuitWithoutSaving => return Err(ChangeOrError::Error(UIErrorKind::Abort)), } }, } eprintln!(""); } } fn select_sides() -> UIResult<Sides> { let choices = &[ "X0", "X1", "Y0", "Y1", "Z0", "Z1" ]; eprintln!("Set which sides (X0/X1 etc. for each direction) to construct\n\ ([space] select, [enter] confirm):"); let selections = Checkboxes::new().items(choices).interact()?; let mut sides = Sides::empty(); if selections.contains(&0) { sides.insert(Sides::X0); } if selections.contains(&1) { sides.insert(Sides::X1); } if selections.contains(&2) { sides.insert(Sides::Y0); } if selections.contains(&3) { sides.insert(Sides::Y1); } if selections.contains(&4) { sides.insert(Sides::Z0); } if selections.contains(&5) { sides.insert(Sides::Z1); } Ok(sides) } /************************************ * Selection of lattice and residue * ************************************/ #[derive(Clone, Copy, Debug)] /// Available lattices to construct from. Each of these require /// a separate constructor since they have different qualities in /// their corresponding `LatticeType` unit. enum LatticeSelection { Triclinic, Hexagonal, PoissonDisc, } fn get_density() -> UIResult<Option<f64>> { let density = get_value_from_user::<f64>("Density (1/nm^3, negative: unset)")?; if density > 0.0 { Ok(Some(density)) } else { Ok(None) } } fn select_residue(residue_list: &[Residue]) -> UIResult<Residue> { select_item(&residue_list, None).map(|res| res.clone()) } fn select_lattice() -> UIResult<LatticeType> { use self::LatticeSelection::*; let (choices, item_texts) = create_menu_items![ (Triclinic, "Triclinic lattice: two base vector lengths and an in-between angle"), (Hexagonal, "Hexagonal lattice: a honeycomb grid with a spacing"), (PoissonDisc, "Poisson disc: Randomly generated points with a density") ]; let lattice = select_command(item_texts, choices)?; match lattice { Triclinic => { eprintln!("A triclinic lattice is constructed from two base "); eprintln!("vectors of length 'a' and 'b', separated by an angle 'γ'."); eprintln!(""); let a = get_value_from_user::<f64>("Length 'a' (nm)")?; let b = get_value_from_user::<f64>("Length 'b' (nm)")?; let gamma = get_value_from_user::<f64>("Angle 'γ' (deg.)")?; Ok(LatticeType::Triclinic { a, b, gamma }) }, Hexagonal => { eprintln!("A hexagonal lattice is a honeycomb grid with an input side length 'a'."); eprintln!(""); let a = get_value_from_user::<f64>("Spacing 'a' (nm)")?; Ok(LatticeType::Hexagonal { a }) }, PoissonDisc => { eprintln!("A Poisson disc is a generated set of points with an even distribution."); eprintln!("They are generated with an input density 'ρ' points per area."); eprintln!(""); let density = get_value_from_user::<f64>("Density 'ρ' (1/nm^2)")?; Ok(LatticeType::PoissonDisc { density }) }, } }
use std::error::Error; use std::fmt::{self, Debug, Formatter, Display}; use std::str::{self, Utf8Error}; use std::sync::Arc; use mioco::sync::{Mutex, RwLock}; use mioco::sync::mpsc::Sender; use utils::*; use rand; pub type Id = u32; pub struct Player { pub id : Id, pub tx : Mutex<Sender<Arc<Message>>>, pub state : RwLock<Arc<PlayerState>> // this lock is quite uselsss as it is never read elsewhere than handler } impl Player { pub fn new(tx : Sender<Arc<Message>>) -> Player { Player { id : rand::random(), tx : Mutex::new(tx), state : RwLock::new(Arc::new( PlayerState { status : PlayerStatus::OnHold, name : String::new() })) } } pub fn set_name(&self, name : String) -> BasicResult<()> { self.update_state(move |state| { PlayerState { name : name, status: state.status.clone() } }) } pub fn set_status(&self, status : PlayerStatus) -> BasicResult<()> { self.update_state(move |state| { PlayerState { name : state.name.to_owned(), status: status } }) } pub fn is_on_hold(&self) -> BasicResult<bool> { let state = try!(box_err(self.state.read())); Ok(match state.status { PlayerStatus::OnHold => true, _ => false }) } pub fn is_on_hold_unsafe(&self) -> bool { self.is_on_hold().unwrap_or(false) } fn update_state<F>(&self, update : F) -> BasicResult<()> where F : FnOnce(&PlayerState) -> PlayerState { let mut st = try!(box_err(self.state.write())); *Arc::make_mut(&mut st) = update(&st); Ok(()) } } impl Debug for Player { fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { let s = format!("Player[{}, {:?}]", self.id, self.state); Display::fmt(&s, f) } } #[derive(Clone, Debug)] pub struct PlayerState { pub status : PlayerStatus, pub name : String } #[derive(Clone, Debug)] pub enum PlayerStatus { OnHold, Duelling(Duel) } pub struct Duel { pub player1 : Arc<Player>, pub player2 : Arc<Player> } impl Clone for Duel { fn clone(&self) -> Duel { Duel { player1 : self.player1.clone(), player2 : self.player2.clone(), } } } impl Debug for Duel { fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { let s = format!("[{} vs {}]", self.player1.id, self.player2.id); Display::fmt(&s, f) } } impl Duel { pub fn other_player(&self, id : Id) -> Arc<Player> { if self.player1.id == id { self.player2.clone() } else { self.player1.clone() } } } #[derive(Debug)] pub struct Request { pub src_id : Id, pub dest_id : Id } #[allow(non_snake_case)] pub mod MessageType { pub type Value = usize; #[allow(non_upper_case_globals)] pub const Welcome : Value = 0; #[allow(non_upper_case_globals)] pub const Name : Value = 1; #[allow(non_upper_case_globals)] pub const RequestDuel : Value = 2; #[allow(non_upper_case_globals)] pub const RequestFailed: Value = 3; #[allow(non_upper_case_globals)] pub const NewGame : Value = 4; #[allow(non_upper_case_globals)] pub const Proxy : Value = 5; #[allow(non_upper_case_globals)] pub const ExitDuel : Value = 6; #[allow(non_upper_case_globals)] pub const ListPlayers : Value = 7; #[allow(non_upper_case_globals)] pub const Dump : Value = 100; } #[derive(Debug)] pub struct Header { pub message_type : MessageType::Value, pub message_length : usize, pub message_id : i64, pub answer_id : i64 } impl Header { pub fn to_string(&self) -> String { format!("{};{};{};{}", self.message_type, self.message_length, self.message_id, self.answer_id) } pub fn parse(s : &str) -> Result<Header, Box<Error>> { let v : Vec<&str> = s.trim_matches('\n').split(";").collect(); Ok( Header { message_type : try!(v[0].parse()), message_length : try!(v[1].parse()), message_id : try!(v[2].parse()), answer_id : try!(v[3].parse()) }) } } #[derive(Debug)] pub struct Message { pub header : Header, pub body : Vec<u8> } impl Message { pub fn new(msg_type : MessageType::Value, body : &str) -> Message { let msg_body = body.as_bytes().to_vec(); Message{ header : Header { message_type : msg_type, message_length: msg_body.len(), message_id : 0, answer_id : 0 }, body : msg_body } } pub fn body_as_str(&self) -> Result<&str, Utf8Error> { str::from_utf8(&self.body) } }
use std::fmt::Debug; use std::ops::{Add, Mul, Sub}; use cgmath::{ BaseFloat, Basis2, EuclideanSpace, InnerSpace, Matrix3, Point2, Point3, Quaternion, Rotation, Transform, Vector3, Zero, }; use collision::dbvt::TreeValue; use collision::{Bound, ComputeBound, Contains, Discrete, HasBound, SurfaceArea, Union}; use core::{ ApplyAngular, BroadPhase, GetId, Inertia, NarrowPhase, PartialCrossProduct, PhysicsTime, Pose, Primitive, }; use specs::prelude::{Component, DispatcherBuilder, Entity, Tracked}; /// Create systems and add to a `Dispatcher` graph. /// /// ### Parameters /// /// - `dispatcher`: The dispatcher to add the systems to. /// - `broad_phase`: Broad phase to use /// - `narrow_phase`: Narrow phase to use /// - `spatial`: If spatial or basic collision detection should be used /// /// ### Type parameters: /// /// - `P`: Shape primitive /// - `T`: Pose (transform) /// - `B`: Bounding volume /// - `D`: Broad phase data, usually `TreeValueWrapped`. /// - `Y`: Collider /// - `V`: Broad phase algorithm /// - `N`: Narrow phase algorithm /// - `R`: Rotational quantity, `Basis2` or `Quaternion` /// - `A`: Angular velocity, `Scalar` or `Vector3` /// - `I`: Inertia, `Scalar` or `Matrix3` /// - `DT`: Time quantity, usually `DeltaTime` /// - `O`: Internal type used to abstract cross product for 2D vs 3D, `Scalar` or `Vector3` pub fn setup_dispatch<'a, 'b, P, T, B, D, Y, V, N, R, A, I, DT, O>( dispatcher: &mut DispatcherBuilder<'a, 'b>, broad_phase: V, narrow_phase: N, spatial: bool, ) where V: BroadPhase<D> + BroadPhase<(usize, D)> + 'static, N: NarrowPhase<P, T, B, Y> + 'static, P: Primitive + ComputeBound<B> + Send + Sync + 'static, P::Point: Debug + Send + Sync + 'static, <P::Point as EuclideanSpace>::Scalar: BaseFloat + Send + Sync + 'static, <P::Point as EuclideanSpace>::Diff: InnerSpace + PartialCrossProduct<<P::Point as EuclideanSpace>::Diff, Output = O> + Debug + Send + Sync + 'static, T: Debug + Component + Pose<P::Point, R> + Transform<P::Point> + Send + Sync + Clone + 'static, T::Storage: Tracked, Y: Default + Send + Sync + 'static, B: Bound<Point = P::Point> + Send + Sync + 'static + Union<B, Output = B> + Clone + Contains<B> + SurfaceArea<Scalar = <P::Point as EuclideanSpace>::Scalar> + Discrete<B> + Debug, (usize, D): HasBound<Bound = B>, D: TreeValue<Bound = B> + HasBound<Bound = B> + From<(Entity, B)> + GetId<Entity> + Send + Sync + 'static, R: Rotation<P::Point> + ApplyAngular<<P::Point as EuclideanSpace>::Scalar, A> + Send + Sync + 'static, I: Inertia<Orientation = R> + Mul<A, Output = A> + Mul<O, Output = O> + Send + Sync + 'static, A: Mul<<P::Point as EuclideanSpace>::Scalar, Output = A> + PartialCrossProduct< <P::Point as EuclideanSpace>::Diff, Output = <P::Point as EuclideanSpace>::Diff, > + Zero + Clone + Copy + Send + Sync + 'static, DT: PhysicsTime<<P::Point as EuclideanSpace>::Scalar> + Default + Send + Sync + 'static, O: PartialCrossProduct< <P::Point as EuclideanSpace>::Diff, Output = <P::Point as EuclideanSpace>::Diff, > + Send + Sync + 'static, for<'c> &'c A: Sub<O, Output = A> + Add<O, Output = A>, { use { BasicCollisionSystem, ContactResolutionSystem, CurrentFrameUpdateSystem, NextFrameSetupSystem, SpatialCollisionSystem, SpatialSortingSystem, }; dispatcher.add( CurrentFrameUpdateSystem::<P::Point, R, A, T>::new(), "physics_solver_system", &[], ); dispatcher.add( NextFrameSetupSystem::<P::Point, R, I, A, T, DT>::new(), "next_frame_setup", &["physics_solver_system"], ); if spatial { dispatcher.add( SpatialSortingSystem::<P, T, D, B, Y>::new(), "spatial_sorting_system", &["next_frame_setup"], ); dispatcher.add( SpatialCollisionSystem::<P, T, (usize, D), B, Y>::new() .with_broad_phase(broad_phase) .with_narrow_phase(narrow_phase), "collision_system", &["spatial_sorting_system"], ); } else { dispatcher.add( BasicCollisionSystem::<P, T, D, B, Y>::new() .with_broad_phase(broad_phase) .with_narrow_phase(narrow_phase), "collision_system", &["next_frame_setup"], ); } dispatcher.add( ContactResolutionSystem::<P::Point, R, I, A, O, T>::new(), "contact_resolution", &["collision_system"], ); } /// Create systems for 2D and add to a `Dispatcher` graph. /// /// ### Parameters /// /// - `dispatcher`: The dispatcher to add the systems to. /// - `broad_phase`: Broad phase to use /// - `narrow_phase`: Narrow phase to use /// - `spatial`: If spatial or basic collision detection should be used /// /// ### Type parameters: /// /// - `S`: Scalar type, `f32` or `f64` /// - `P`: Shape primitive /// - `T`: Pose (transform) /// - `B`: Bounding volume /// - `D`: Broad phase data, usually `TreeValueWrapped`. /// - `Y`: Collider /// - `V`: Broad phase algorithm /// - `N`: Narrow phase algorithm /// - `DT`: Time quantity, usually `DeltaTime` pub fn setup_dispatch_2d<'a, 'b, S, P, T, B, D, Y, V, N, DT>( dispatcher: &mut DispatcherBuilder<'a, 'b>, broad_phase: V, narrow_phase: N, spatial: bool, ) where V: BroadPhase<D> + BroadPhase<(usize, D)> + 'static, N: NarrowPhase<P, T, B, Y> + 'static, P: Primitive<Point = Point2<S>> + ComputeBound<B> + Send + Sync + 'static, S: Inertia<Orientation = Basis2<S>> + BaseFloat + Send + Sync + 'static, T: Component + Pose<Point2<S>, Basis2<S>> + Debug + Transform<Point2<S>> + Send + Sync + Clone + 'static, T::Storage: Tracked, Y: Default + Send + Sync + 'static, B: Bound<Point = Point2<S>> + Send + Sync + 'static + Union<B, Output = B> + Clone + Contains<B> + SurfaceArea<Scalar = S> + Discrete<B> + Debug, (usize, D): HasBound<Bound = B>, D: TreeValue<Bound = B> + HasBound<Bound = B> + From<(Entity, B)> + GetId<Entity> + Send + Sync + 'static, DT: PhysicsTime<S> + Default + Send + Sync + 'static, for<'c> &'c S: Sub<S, Output = S> + Add<S, Output = S>, { setup_dispatch::<P, T, B, D, Y, V, N, Basis2<S>, S, S, DT, S>( dispatcher, broad_phase, narrow_phase, spatial, ); } /// Create systems for 3sD and add to a `Dispatcher` graph. /// /// ### Parameters /// /// - `dispatcher`: The dispatcher to add the systems to. /// - `broad_phase`: Broad phase to use /// - `narrow_phase`: Narrow phase to use /// - `spatial`: If spatial or basic collision detection should be used /// /// ### Type parameters: /// /// - `S`: Scalar type, `f32` or `f64` /// - `P`: Shape primitive /// - `T`: Pose (transform) /// - `B`: Bounding volume /// - `D`: Broad phase data, usually `TreeValueWrapped`. /// - `Y`: Collider /// - `V`: Broad phase algorithm /// - `N`: Narrow phase algorithm /// - `DT`: Time quantity, usually `DeltaTime` pub fn setup_dispatch_3d<S, P, T, B, D, Y, V, N, DT>( dispatcher: &mut DispatcherBuilder, broad_phase: V, narrow_phase: N, spatial: bool, ) where V: BroadPhase<D> + BroadPhase<(usize, D)> + 'static, N: NarrowPhase<P, T, B, Y> + 'static, P: Primitive<Point = Point3<S>> + ComputeBound<B> + Send + Sync + 'static, S: BaseFloat + Send + Sync + 'static, T: Component + Pose<Point3<S>, Quaternion<S>> + Transform<Point3<S>> + Debug + Send + Sync + Clone + 'static, T::Storage: Tracked, Y: Default + Send + Sync + 'static, B: Bound<Point = Point3<S>> + Send + Sync + 'static + Union<B, Output = B> + Clone + Contains<B> + SurfaceArea<Scalar = S> + Discrete<B> + Debug, (usize, D): HasBound<Bound = B>, D: TreeValue<Bound = B> + HasBound<Bound = B> + From<(Entity, B)> + GetId<Entity> + Send + Sync + 'static, DT: PhysicsTime<S> + Default + Send + Sync + 'static, { setup_dispatch::<P, T, B, D, Y, V, N, Quaternion<S>, Vector3<S>, Matrix3<S>, DT, Vector3<S>>( dispatcher, broad_phase, narrow_phase, spatial, ); } #[cfg(test)] mod tests { use super::*; use collide2d::{BodyPose2, SweepAndPrune2, GJK2}; use collide3d::{BodyPose3, SweepAndPrune3, GJK3}; use collision::dbvt::TreeValueWrapped; use collision::primitive::{Primitive2, Primitive3}; use collision::{Aabb2, Aabb3}; use DeltaTime; #[test] fn test_dispatch() { let mut builder = DispatcherBuilder::new(); setup_dispatch::< Primitive2<f32>, BodyPose2<f32>, Aabb2<f32>, TreeValueWrapped<Entity, Aabb2<f32>>, (), _, _, _, _, f32, DeltaTime<f32>, _, >(&mut builder, SweepAndPrune2::new(), GJK2::new(), false); } #[test] fn test_dispatch_2d() { let mut builder = DispatcherBuilder::new(); setup_dispatch_2d::< _, Primitive2<f32>, BodyPose2<f32>, Aabb2<f32>, TreeValueWrapped<Entity, Aabb2<f32>>, (), _, _, DeltaTime<f32>, >(&mut builder, SweepAndPrune2::new(), GJK2::new(), false); } #[test] fn test_dispatch_3d() { let mut builder = DispatcherBuilder::new(); setup_dispatch_3d::< _, Primitive3<f32>, BodyPose3<f32>, Aabb3<f32>, TreeValueWrapped<Entity, Aabb3<f32>>, (), _, _, DeltaTime<f32>, >(&mut builder, SweepAndPrune3::new(), GJK3::new(), false); } }
/// Compose two functions. /// /// Takes functions `f` and `g` and returns `f ∘ g` (in other words something /// _like_ `|a: A| f(g(a))`. /// /// # Examples: /// /// ``` /// use fntools::unstable::compose; /// /// let add_two = |a: i32| a + 2; /// let add_three = |a: i32| a + 3; /// let add_five = compose(add_two, add_three); /// /// assert_eq!(add_five(4), 9); /// ``` /// /// See also: /// - stable version of this function: [`fntools::compose`] /// - not untupling version of this function: [`compose`] /// - extension on all functions: [`FnExt::compose`] /// /// /// [`FnExt::compose`]: crate::unstable::FnExt::compose /// [`compose`]: super::compose::compose /// [`fntools::compose`]: crate::compose #[inline] pub fn compose<A, F, G>(f: F, g: G) -> Compose<F, G> where F: FnOnce<(G::Output,)>, G: FnOnce<A>, { Compose::new(f, g) } /// Represents composition of 2 functions `F ∘ G`. /// /// > Note: `Compose` and [`Chain`] have no differences but argument order. /// /// For documentation see [`compose`] /// /// [`Chain`]: crate::unstable::Chain #[must_use = "function combinators are lazy and do nothing unless called"] #[derive(Debug, Clone, Copy)] pub struct Compose<F, G> { f: F, g: G, } impl<F, G> Compose<F, G> { /// Creates composition of functions `f` and `g`. /// /// It's preferred to use [`compose`] instead. #[inline] pub fn new<A>(f: F, g: G) -> Self where F: FnOnce<(G::Output,)>, G: FnOnce<A>, { Compose { f, g } } /// Returns inner functions. #[inline] pub fn into_inner(self) -> (F, G) { let Compose { f, g } = self; (f, g) } /// Returns references to inner functions. #[inline] pub fn as_inner(&self) -> (&F, &G) { let Compose { f, g } = self; (f, g) } } impl<A, F, G> FnOnce<A> for Compose<F, G> where F: FnOnce<(G::Output,)>, G: FnOnce<A>, { type Output = F::Output; #[inline] extern "rust-call" fn call_once(self, args: A) -> Self::Output { let Compose { f, g } = self; let b: G::Output = g.call_once(args); let c: F::Output = f(b); c } } impl<A, F, G> FnMut<A> for Compose<F, G> where F: FnMut<(G::Output,)>, G: FnMut<A>, { #[inline] extern "rust-call" fn call_mut(&mut self, args: A) -> Self::Output { let Compose { f, g } = self; let b: G::Output = g.call_mut(args); let c: F::Output = f(b); c } } impl<A, F, G> Fn<A> for Compose<F, G> where F: Fn<(G::Output,)>, G: Fn<A>, { #[inline] extern "rust-call" fn call(&self, args: A) -> Self::Output { let Compose { f, g } = self; let b: G::Output = g.call(args); let c: F::Output = f(b); c } }
use std::cell::RefCell; use std::collections::BTreeMap; use std::fmt; use std::rc::Rc; use cranelift_entity::{entity_impl, PrimaryMap}; use firefly_diagnostics::{SourceSpan, Spanned}; use firefly_syntax_base::{FunctionName, Signature}; use super::*; /// Represents the structure of a function #[derive(Clone, Spanned)] pub struct Function { pub id: FuncRef, #[span] pub span: SourceSpan, pub signature: Signature, pub dfg: DataFlowGraph, } impl fmt::Debug for Function { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "Function(id = {:?}, span = {:?}, sig = {:?})", self.id, self.span, &self.signature ) } } impl Function { pub fn new( id: FuncRef, span: SourceSpan, signature: Signature, signatures: Rc<RefCell<PrimaryMap<FuncRef, Signature>>>, callees: Rc<RefCell<BTreeMap<FunctionName, FuncRef>>>, constants: Rc<RefCell<ConstantPool>>, ) -> Self { let dfg = DataFlowGraph::new(signatures, callees, constants); Self { id, span, signature, dfg, } } } /// A handle that refers to a function either imported/local, or external #[derive(Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct FuncRef(u32); entity_impl!(FuncRef, "fn");
#[doc = "Reader of register MPCBB1_VCTR24"] pub type R = crate::R<u32, super::MPCBB1_VCTR24>; #[doc = "Writer for register MPCBB1_VCTR24"] pub type W = crate::W<u32, super::MPCBB1_VCTR24>; #[doc = "Register MPCBB1_VCTR24 `reset()`'s with value 0xffff_ffff"] impl crate::ResetValue for super::MPCBB1_VCTR24 { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0xffff_ffff } } #[doc = "Reader of field `B768`"] pub type B768_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B768`"] pub struct B768_W<'a> { w: &'a mut W, } impl<'a> B768_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } #[doc = "Reader of field `B769`"] pub type B769_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B769`"] pub struct B769_W<'a> { w: &'a mut W, } impl<'a> B769_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } #[doc = "Reader of field `B770`"] pub type B770_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B770`"] pub struct B770_W<'a> { w: &'a mut W, } impl<'a> B770_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } #[doc = "Reader of field `B771`"] pub type B771_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B771`"] pub struct B771_W<'a> { w: &'a mut W, } impl<'a> B771_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } #[doc = "Reader of field `B772`"] pub type B772_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B772`"] pub struct B772_W<'a> { w: &'a mut W, } impl<'a> B772_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } #[doc = "Reader of field `B773`"] pub type B773_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B773`"] pub struct B773_W<'a> { w: &'a mut W, } impl<'a> B773_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } #[doc = "Reader of field `B774`"] pub type B774_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B774`"] pub struct B774_W<'a> { w: &'a mut W, } impl<'a> B774_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } #[doc = "Reader of field `B775`"] pub type B775_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B775`"] pub struct B775_W<'a> { w: &'a mut W, } impl<'a> B775_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } #[doc = "Reader of field `B776`"] pub type B776_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B776`"] pub struct B776_W<'a> { w: &'a mut W, } impl<'a> B776_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } #[doc = "Reader of field `B777`"] pub type B777_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B777`"] pub struct B777_W<'a> { w: &'a mut W, } impl<'a> B777_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } #[doc = "Reader of field `B778`"] pub type B778_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B778`"] pub struct B778_W<'a> { w: &'a mut W, } impl<'a> B778_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } #[doc = "Reader of field `B779`"] pub type B779_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B779`"] pub struct B779_W<'a> { w: &'a mut W, } impl<'a> B779_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } #[doc = "Reader of field `B780`"] pub type B780_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B780`"] pub struct B780_W<'a> { w: &'a mut W, } impl<'a> B780_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } #[doc = "Reader of field `B781`"] pub type B781_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B781`"] pub struct B781_W<'a> { w: &'a mut W, } impl<'a> B781_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } #[doc = "Reader of field `B782`"] pub type B782_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B782`"] pub struct B782_W<'a> { w: &'a mut W, } impl<'a> B782_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } #[doc = "Reader of field `B783`"] pub type B783_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B783`"] pub struct B783_W<'a> { w: &'a mut W, } impl<'a> B783_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } #[doc = "Reader of field `B784`"] pub type B784_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B784`"] pub struct B784_W<'a> { w: &'a mut W, } impl<'a> B784_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } #[doc = "Reader of field `B785`"] pub type B785_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B785`"] pub struct B785_W<'a> { w: &'a mut W, } impl<'a> B785_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } #[doc = "Reader of field `B786`"] pub type B786_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B786`"] pub struct B786_W<'a> { w: &'a mut W, } impl<'a> B786_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } #[doc = "Reader of field `B787`"] pub type B787_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B787`"] pub struct B787_W<'a> { w: &'a mut W, } impl<'a> B787_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } #[doc = "Reader of field `B788`"] pub type B788_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B788`"] pub struct B788_W<'a> { w: &'a mut W, } impl<'a> B788_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } #[doc = "Reader of field `B789`"] pub type B789_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B789`"] pub struct B789_W<'a> { w: &'a mut W, } impl<'a> B789_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } #[doc = "Reader of field `B790`"] pub type B790_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B790`"] pub struct B790_W<'a> { w: &'a mut W, } impl<'a> B790_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } #[doc = "Reader of field `B791`"] pub type B791_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B791`"] pub struct B791_W<'a> { w: &'a mut W, } impl<'a> B791_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } #[doc = "Reader of field `B792`"] pub type B792_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B792`"] pub struct B792_W<'a> { w: &'a mut W, } impl<'a> B792_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } #[doc = "Reader of field `B793`"] pub type B793_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B793`"] pub struct B793_W<'a> { w: &'a mut W, } impl<'a> B793_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } #[doc = "Reader of field `B794`"] pub type B794_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B794`"] pub struct B794_W<'a> { w: &'a mut W, } impl<'a> B794_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } #[doc = "Reader of field `B795`"] pub type B795_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B795`"] pub struct B795_W<'a> { w: &'a mut W, } impl<'a> B795_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } #[doc = "Reader of field `B796`"] pub type B796_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B796`"] pub struct B796_W<'a> { w: &'a mut W, } impl<'a> B796_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } #[doc = "Reader of field `B797`"] pub type B797_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B797`"] pub struct B797_W<'a> { w: &'a mut W, } impl<'a> B797_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } #[doc = "Reader of field `B798`"] pub type B798_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B798`"] pub struct B798_W<'a> { w: &'a mut W, } impl<'a> B798_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } #[doc = "Reader of field `B799`"] pub type B799_R = crate::R<bool, bool>; #[doc = "Write proxy for field `B799`"] pub struct B799_W<'a> { w: &'a mut W, } impl<'a> B799_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { #[doc = "Bit 0 - B768"] #[inline(always)] pub fn b768(&self) -> B768_R { B768_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - B769"] #[inline(always)] pub fn b769(&self) -> B769_R { B769_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - B770"] #[inline(always)] pub fn b770(&self) -> B770_R { B770_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - B771"] #[inline(always)] pub fn b771(&self) -> B771_R { B771_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - B772"] #[inline(always)] pub fn b772(&self) -> B772_R { B772_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - B773"] #[inline(always)] pub fn b773(&self) -> B773_R { B773_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - B774"] #[inline(always)] pub fn b774(&self) -> B774_R { B774_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - B775"] #[inline(always)] pub fn b775(&self) -> B775_R { B775_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - B776"] #[inline(always)] pub fn b776(&self) -> B776_R { B776_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - B777"] #[inline(always)] pub fn b777(&self) -> B777_R { B777_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - B778"] #[inline(always)] pub fn b778(&self) -> B778_R { B778_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - B779"] #[inline(always)] pub fn b779(&self) -> B779_R { B779_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - B780"] #[inline(always)] pub fn b780(&self) -> B780_R { B780_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - B781"] #[inline(always)] pub fn b781(&self) -> B781_R { B781_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - B782"] #[inline(always)] pub fn b782(&self) -> B782_R { B782_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - B783"] #[inline(always)] pub fn b783(&self) -> B783_R { B783_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - B784"] #[inline(always)] pub fn b784(&self) -> B784_R { B784_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - B785"] #[inline(always)] pub fn b785(&self) -> B785_R { B785_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - B786"] #[inline(always)] pub fn b786(&self) -> B786_R { B786_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - B787"] #[inline(always)] pub fn b787(&self) -> B787_R { B787_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - B788"] #[inline(always)] pub fn b788(&self) -> B788_R { B788_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - B789"] #[inline(always)] pub fn b789(&self) -> B789_R { B789_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - B790"] #[inline(always)] pub fn b790(&self) -> B790_R { B790_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - B791"] #[inline(always)] pub fn b791(&self) -> B791_R { B791_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - B792"] #[inline(always)] pub fn b792(&self) -> B792_R { B792_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - B793"] #[inline(always)] pub fn b793(&self) -> B793_R { B793_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - B794"] #[inline(always)] pub fn b794(&self) -> B794_R { B794_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - B795"] #[inline(always)] pub fn b795(&self) -> B795_R { B795_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - B796"] #[inline(always)] pub fn b796(&self) -> B796_R { B796_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - B797"] #[inline(always)] pub fn b797(&self) -> B797_R { B797_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - B798"] #[inline(always)] pub fn b798(&self) -> B798_R { B798_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - B799"] #[inline(always)] pub fn b799(&self) -> B799_R { B799_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { #[doc = "Bit 0 - B768"] #[inline(always)] pub fn b768(&mut self) -> B768_W { B768_W { w: self } } #[doc = "Bit 1 - B769"] #[inline(always)] pub fn b769(&mut self) -> B769_W { B769_W { w: self } } #[doc = "Bit 2 - B770"] #[inline(always)] pub fn b770(&mut self) -> B770_W { B770_W { w: self } } #[doc = "Bit 3 - B771"] #[inline(always)] pub fn b771(&mut self) -> B771_W { B771_W { w: self } } #[doc = "Bit 4 - B772"] #[inline(always)] pub fn b772(&mut self) -> B772_W { B772_W { w: self } } #[doc = "Bit 5 - B773"] #[inline(always)] pub fn b773(&mut self) -> B773_W { B773_W { w: self } } #[doc = "Bit 6 - B774"] #[inline(always)] pub fn b774(&mut self) -> B774_W { B774_W { w: self } } #[doc = "Bit 7 - B775"] #[inline(always)] pub fn b775(&mut self) -> B775_W { B775_W { w: self } } #[doc = "Bit 8 - B776"] #[inline(always)] pub fn b776(&mut self) -> B776_W { B776_W { w: self } } #[doc = "Bit 9 - B777"] #[inline(always)] pub fn b777(&mut self) -> B777_W { B777_W { w: self } } #[doc = "Bit 10 - B778"] #[inline(always)] pub fn b778(&mut self) -> B778_W { B778_W { w: self } } #[doc = "Bit 11 - B779"] #[inline(always)] pub fn b779(&mut self) -> B779_W { B779_W { w: self } } #[doc = "Bit 12 - B780"] #[inline(always)] pub fn b780(&mut self) -> B780_W { B780_W { w: self } } #[doc = "Bit 13 - B781"] #[inline(always)] pub fn b781(&mut self) -> B781_W { B781_W { w: self } } #[doc = "Bit 14 - B782"] #[inline(always)] pub fn b782(&mut self) -> B782_W { B782_W { w: self } } #[doc = "Bit 15 - B783"] #[inline(always)] pub fn b783(&mut self) -> B783_W { B783_W { w: self } } #[doc = "Bit 16 - B784"] #[inline(always)] pub fn b784(&mut self) -> B784_W { B784_W { w: self } } #[doc = "Bit 17 - B785"] #[inline(always)] pub fn b785(&mut self) -> B785_W { B785_W { w: self } } #[doc = "Bit 18 - B786"] #[inline(always)] pub fn b786(&mut self) -> B786_W { B786_W { w: self } } #[doc = "Bit 19 - B787"] #[inline(always)] pub fn b787(&mut self) -> B787_W { B787_W { w: self } } #[doc = "Bit 20 - B788"] #[inline(always)] pub fn b788(&mut self) -> B788_W { B788_W { w: self } } #[doc = "Bit 21 - B789"] #[inline(always)] pub fn b789(&mut self) -> B789_W { B789_W { w: self } } #[doc = "Bit 22 - B790"] #[inline(always)] pub fn b790(&mut self) -> B790_W { B790_W { w: self } } #[doc = "Bit 23 - B791"] #[inline(always)] pub fn b791(&mut self) -> B791_W { B791_W { w: self } } #[doc = "Bit 24 - B792"] #[inline(always)] pub fn b792(&mut self) -> B792_W { B792_W { w: self } } #[doc = "Bit 25 - B793"] #[inline(always)] pub fn b793(&mut self) -> B793_W { B793_W { w: self } } #[doc = "Bit 26 - B794"] #[inline(always)] pub fn b794(&mut self) -> B794_W { B794_W { w: self } } #[doc = "Bit 27 - B795"] #[inline(always)] pub fn b795(&mut self) -> B795_W { B795_W { w: self } } #[doc = "Bit 28 - B796"] #[inline(always)] pub fn b796(&mut self) -> B796_W { B796_W { w: self } } #[doc = "Bit 29 - B797"] #[inline(always)] pub fn b797(&mut self) -> B797_W { B797_W { w: self } } #[doc = "Bit 30 - B798"] #[inline(always)] pub fn b798(&mut self) -> B798_W { B798_W { w: self } } #[doc = "Bit 31 - B799"] #[inline(always)] pub fn b799(&mut self) -> B799_W { B799_W { w: self } } }
// "Tifflin" Kernel // - By John Hodge (thePowersGang) // // arch/amd64/macros.rs // - Architecture-provided macros /// Emits a distinctive instruction (with no effect) // SAFE: No-op macro_rules! CHECKMARK{ () => (unsafe { asm!("xchg cx, cx", options(nostack));}); } // vim: ft=rust
use std::{ borrow::Cow, ops::{Deref, DerefMut}, }; use serde::{de::DeserializeOwned, Deserialize, Serialize}; use crate::{ from_value, parser::types::Field, registry::{MetaType, MetaTypeId, Registry}, to_value, ContextSelectionSet, InputType, InputValueResult, OutputType, Positioned, ServerResult, Value, }; /// A scalar that can represent any JSON value. /// /// If the inner type cannot be serialized as JSON (e.g. it has non-string keys) /// it will be `null`. #[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, Hash, Default)] #[serde(transparent)] pub struct Json<T>(pub T); impl<T> Deref for Json<T> { type Target = T; fn deref(&self) -> &Self::Target { &self.0 } } impl<T> DerefMut for Json<T> { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 } } impl<T> From<T> for Json<T> { fn from(value: T) -> Self { Self(value) } } impl<T: DeserializeOwned + Serialize + Send + Sync> InputType for Json<T> { type RawValueType = T; fn type_name() -> Cow<'static, str> { Cow::Borrowed("JSON") } fn create_type_info(registry: &mut Registry) -> String { registry.create_input_type::<Json<T>, _>(MetaTypeId::Scalar, |_| MetaType::Scalar { name: <Self as InputType>::type_name().to_string(), description: Some("A scalar that can represent any JSON value.".to_string()), is_valid: None, visible: None, inaccessible: false, tags: Default::default(), specified_by_url: None, }) } fn parse(value: Option<Value>) -> InputValueResult<Self> { Ok(from_value(value.unwrap_or_default())?) } fn to_value(&self) -> Value { Value::String(serde_json::to_string(&self.0).unwrap_or_default()) } fn as_raw_value(&self) -> Option<&Self::RawValueType> { Some(&self.0) } } #[async_trait::async_trait] impl<T: Serialize + Send + Sync> OutputType for Json<T> { fn type_name() -> Cow<'static, str> { Cow::Borrowed("JSON") } fn create_type_info(registry: &mut Registry) -> String { registry.create_output_type::<Json<T>, _>(MetaTypeId::Scalar, |_| MetaType::Scalar { name: <Self as OutputType>::type_name().to_string(), description: Some("A scalar that can represent any JSON value.".to_string()), is_valid: None, visible: None, inaccessible: false, tags: Default::default(), specified_by_url: None, }) } async fn resolve( &self, _ctx: &ContextSelectionSet<'_>, _field: &Positioned<Field>, ) -> ServerResult<Value> { Ok(to_value(&self.0).ok().unwrap_or_default()) } } impl InputType for serde_json::Value { type RawValueType = serde_json::Value; fn type_name() -> Cow<'static, str> { Cow::Borrowed("JSON") } fn create_type_info(registry: &mut Registry) -> String { registry.create_input_type::<serde_json::Value, _>(MetaTypeId::Scalar, |_| { MetaType::Scalar { name: <Self as InputType>::type_name().to_string(), description: Some("A scalar that can represent any JSON value.".to_string()), is_valid: None, visible: None, inaccessible: false, tags: Default::default(), specified_by_url: None, } }) } fn parse(value: Option<Value>) -> InputValueResult<Self> { Ok(from_value(value.unwrap_or_default())?) } fn to_value(&self) -> Value { Value::String(self.to_string()) } fn as_raw_value(&self) -> Option<&Self::RawValueType> { Some(&self) } } #[async_trait::async_trait] impl OutputType for serde_json::Value { fn type_name() -> Cow<'static, str> { Cow::Borrowed("JSON") } fn create_type_info(registry: &mut Registry) -> String { registry.create_output_type::<serde_json::Value, _>(MetaTypeId::Scalar, |_| { MetaType::Scalar { name: <Self as OutputType>::type_name().to_string(), description: Some("A scalar that can represent any JSON value.".to_string()), is_valid: None, visible: None, inaccessible: false, tags: Default::default(), specified_by_url: None, } }) } async fn resolve( &self, _ctx: &ContextSelectionSet<'_>, _field: &Positioned<Field>, ) -> ServerResult<Value> { Ok(to_value(&self).ok().unwrap_or_default()) } } #[cfg(test)] mod test { use std::collections::HashMap; use serde::{Deserialize, Serialize}; use crate::*; #[tokio::test] async fn test_json_type() { #[derive(Serialize, Deserialize)] struct MyStruct { a: i32, b: i32, c: HashMap<String, i32>, } struct Query; #[Object(internal)] impl Query { async fn obj(&self, input: Json<MyStruct>) -> Json<MyStruct> { input } } let query = r#"{ obj(input: { a: 1, b: 2, c: { a: 11, b: 22 } } ) }"#; let schema = Schema::new(Query, EmptyMutation, EmptySubscription); assert_eq!( schema.execute(query).await.into_result().unwrap().data, value!({ "obj": { "a": 1, "b": 2, "c": { "a": 11, "b": 22 } } }) ); } #[tokio::test] async fn test_json_type_for_serialize_only() { #[derive(Serialize)] struct MyStruct { a: i32, b: i32, c: HashMap<String, i32>, } struct Query; #[Object(internal)] impl Query { async fn obj(&self) -> Json<MyStruct> { MyStruct { a: 1, b: 2, c: { let mut values = HashMap::new(); values.insert("a".to_string(), 11); values.insert("b".to_string(), 22); values }, } .into() } } let query = r#"{ obj }"#; let schema = Schema::new(Query, EmptyMutation, EmptySubscription); assert_eq!( schema.execute(query).await.into_result().unwrap().data, value!({ "obj": { "a": 1, "b": 2, "c": { "a": 11, "b": 22 } } }) ); } }
// Copyright 2020 IOTA Stiftung // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on // an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and limitations under the License. //! Binary representation of big integers. use crate::ternary::bigint::sealed::Sealed; /// The number of bits in an U384/I384. pub const BINARY_LEN: usize = 384; /// Binary representation of a big integer. pub trait BinaryRepresentation: Sealed + Clone { /// Inner representation type of the big integer. type Inner; /// Iterates over a slice of the inner representation type of the big integer. fn iter(&self) -> std::slice::Iter<'_, Self::Inner>; } /// The number of `u8`s in an U384/I384. pub const BINARY_LEN_IN_U8: usize = BINARY_LEN / 8; // 48 /// The inner representation of an U384/I384 using `BINARY_LEN_IN_U8` `u8`s. pub type U8Repr = [u8; BINARY_LEN_IN_U8]; impl Sealed for U8Repr {} impl BinaryRepresentation for U8Repr { type Inner = u8; fn iter(&self) -> std::slice::Iter<'_, Self::Inner> { (self as &[Self::Inner]).iter() } } /// The number of `u32`s in an U384/I384. pub const BINARY_LEN_IN_U32: usize = BINARY_LEN / 32; // 12 /// The inner representation of an U384/I384 using `BINARY_LEN_IN_U32` `u32`s. pub type U32Repr = [u32; BINARY_LEN_IN_U32]; impl Sealed for U32Repr {} impl BinaryRepresentation for U32Repr { type Inner = u32; fn iter(&self) -> std::slice::Iter<'_, Self::Inner> { (self as &[Self::Inner]).iter() } }
use std::{borrow::Cow, convert::TryInto, path::PathBuf, sync::Arc, time::Instant}; use arrow::{ array::{ArrayRef, Int64Array, StringArray}, record_batch::RecordBatch, }; use futures::TryStreamExt; use observability_deps::tracing::{debug, info}; use rustyline::{error::ReadlineError, hint::Hinter, history::FileHistory, Editor}; use snafu::{ResultExt, Snafu}; use super::repl_command::ReplCommand; use influxdb_iox_client::{connection::Connection, format::QueryOutputFormat}; #[derive(Debug, Snafu)] pub enum Error { #[snafu(display("Error reading command: {}", source))] Readline { source: ReadlineError }, #[snafu(display("Error loading remote state: {}", source))] LoadingRemoteState { source: Box<dyn std::error::Error + Send + Sync + 'static>, }, #[snafu(display("Error formatting results: {}", source))] FormattingResults { source: influxdb_iox_client::format::Error, }, #[snafu(display("Error setting format to '{}': {}", requested_format, source))] SettingFormat { requested_format: String, source: influxdb_iox_client::format::Error, }, #[snafu(display("Error parsing command: {}", message))] ParsingCommand { message: String }, #[snafu(display("Error running remote query: {}", source))] RunningRemoteQuery { source: influxdb_iox_client::flight::Error, }, #[snafu(display("Cannot create REPL: {}", source))] ReplCreation { source: ReadlineError }, } pub type Result<T, E = Error> = std::result::Result<T, E>; enum QueryEngine { /// Run queries against the namespace on the remote server Remote(String), } struct RustylineHelper { hinter: rustyline::hint::HistoryHinter, highlighter: rustyline::highlight::MatchingBracketHighlighter, } impl Default for RustylineHelper { fn default() -> Self { Self { hinter: rustyline::hint::HistoryHinter {}, highlighter: rustyline::highlight::MatchingBracketHighlighter::default(), } } } impl rustyline::Helper for RustylineHelper {} impl rustyline::validate::Validator for RustylineHelper { fn validate( &self, ctx: &mut rustyline::validate::ValidationContext<'_>, ) -> rustyline::Result<rustyline::validate::ValidationResult> { let input = ctx.input(); if input.trim_end().ends_with(';') { match ReplCommand::try_from(input) { Ok(_) => Ok(rustyline::validate::ValidationResult::Valid(None)), Err(err) => Ok(rustyline::validate::ValidationResult::Invalid(Some(err))), } } else { Ok(rustyline::validate::ValidationResult::Incomplete) } } } impl rustyline::hint::Hinter for RustylineHelper { type Hint = String; fn hint(&self, line: &str, pos: usize, ctx: &rustyline::Context<'_>) -> Option<String> { self.hinter.hint(line, pos, ctx) } } impl rustyline::highlight::Highlighter for RustylineHelper { fn highlight<'l>(&self, line: &'l str, pos: usize) -> Cow<'l, str> { self.highlighter.highlight(line, pos) } fn highlight_prompt<'b, 's: 'b, 'p: 'b>( &'s self, prompt: &'p str, default: bool, ) -> Cow<'b, str> { self.highlighter.highlight_prompt(prompt, default) } fn highlight_hint<'h>(&self, hint: &'h str) -> Cow<'h, str> { // TODO Detect when windows supports ANSI escapes #[cfg(windows)] { Cow::Borrowed(hint) } #[cfg(not(windows))] { use nu_ansi_term::Style; Cow::Owned(Style::new().dimmed().paint(hint).to_string()) } } fn highlight_candidate<'c>( &self, candidate: &'c str, completion: rustyline::CompletionType, ) -> Cow<'c, str> { self.highlighter.highlight_candidate(candidate, completion) } fn highlight_char(&self, line: &str, pos: usize) -> bool { self.highlighter.highlight_char(line, pos) } } impl rustyline::completion::Completer for RustylineHelper { type Candidate = String; fn complete( &self, line: &str, pos: usize, ctx: &rustyline::Context<'_>, ) -> rustyline::Result<(usize, Vec<Self::Candidate>)> { // If there is a hint, use that as the auto-complete when user hits `tab` if let Some(hint) = self.hinter.hint(line, pos, ctx) { let start_pos = pos; Ok((start_pos, vec![hint])) } else { Ok((0, Vec::with_capacity(0))) } } } /// Captures the state of the repl, gathers commands and executes them /// one by one pub struct Repl { /// Rustyline editor for interacting with user on command line rl: Editor<RustylineHelper, FileHistory>, /// Current prompt prompt: String, /// Client for interacting with IOx namespace API namespace_client: influxdb_iox_client::namespace::Client, /// Client for running sql flight_client: influxdb_iox_client::flight::Client, /// namespace name against which SQL commands are run query_engine: Option<QueryEngine>, /// Formatter to use to format query results output_format: QueryOutputFormat, } impl Repl { fn print_help(&self) { print!("{}", ReplCommand::help()) } /// Create a new Repl instance, connected to the specified URL pub fn new(connection: Connection) -> Result<Self> { let namespace_client = influxdb_iox_client::namespace::Client::new(connection.clone()); let flight_client = influxdb_iox_client::flight::Client::new(connection); let mut rl = Editor::new().context(ReplCreationSnafu)?; rl.set_helper(Some(RustylineHelper::default())); let history_file = history_file(); if let Err(e) = rl.load_history(&history_file) { debug!(%e, "error loading history file"); } let prompt = "> ".to_string(); let output_format = QueryOutputFormat::Pretty; Ok(Self { rl, prompt, namespace_client, flight_client, query_engine: None, output_format, }) } /// Read Evaluate Print Loop (interactive command line) for SQL /// /// Inspired / based on repl.rs from DataFusion pub async fn run(&mut self) -> Result<()> { println!("Ready for commands. (Hint: try 'help;')"); loop { match self.next_command()? { ReplCommand::Help => { self.print_help(); } ReplCommand::ShowNamespaces => { self.list_namespaces() .await .map_err(|e| println!("{e}")) .ok(); } ReplCommand::UseNamespace { db_name } => { self.use_namespace(db_name); } ReplCommand::SqlCommand { sql } => { self.run_sql(sql).await.map_err(|e| println!("{e}")).ok(); } ReplCommand::Exit => { info!("exiting at user request"); return Ok(()); } ReplCommand::SetFormat { format } => { self.set_output_format(format)?; } } } } /// Parss the next command; fn next_command(&mut self) -> Result<ReplCommand> { match self.rl.readline(&self.prompt) { Ok(ref line) if is_exit_command(line) => Ok(ReplCommand::Exit), Ok(ref line) => { let request = line.trim_end(); self.rl .add_history_entry(request.to_owned()) .context(ReadlineSnafu)?; request .try_into() .map_err(|message| Error::ParsingCommand { message }) } Err(ReadlineError::Eof) => { debug!("Received Ctrl-D"); Ok(ReplCommand::Exit) } Err(ReadlineError::Interrupted) => { debug!("Received Ctrl-C"); Ok(ReplCommand::Exit) } // Some sort of real underlying error Err(e) => Err(Error::Readline { source: e }), } } // print all namespaces to the output async fn list_namespaces(&mut self) -> Result<()> { let namespaces = self .namespace_client .get_namespaces() .await .map_err(|e| Box::new(e) as _) .context(LoadingRemoteStateSnafu)?; let namespace_id: Int64Array = namespaces.iter().map(|ns| Some(ns.id)).collect(); let name: StringArray = namespaces.iter().map(|ns| Some(&ns.name)).collect(); let record_batch = RecordBatch::try_from_iter(vec![ ("namespace_id", Arc::new(namespace_id) as ArrayRef), ("name", Arc::new(name) as ArrayRef), ]) .expect("creating record batch successfully"); self.print_results(&[record_batch]) } // Run a command against the currently selected remote namespace async fn run_sql(&mut self, sql: String) -> Result<()> { let start = Instant::now(); let batches: Vec<_> = match &self.query_engine { None => { println!("Error: no namespace selected."); println!("Hint: Run USE NAMESPACE <dbname> to select namespace"); return Ok(()); } Some(QueryEngine::Remote(db_name)) => { info!(%db_name, %sql, "Running sql on remote namespace"); self.flight_client .sql(db_name.to_string(), sql) .await .context(RunningRemoteQuerySnafu)? .try_collect() .await .context(RunningRemoteQuerySnafu)? } }; let end = Instant::now(); self.print_results(&batches)?; println!( "Returned {} in {:?}", Self::row_summary(&batches), end - start ); Ok(()) } fn row_summary<'a>(batches: impl IntoIterator<Item = &'a RecordBatch>) -> String { let total_rows: usize = batches.into_iter().map(|b| b.num_rows()).sum(); if total_rows > 1 { format!("{total_rows} rows") } else if total_rows == 0 { "no rows".to_string() } else { "1 row".to_string() } } fn use_namespace(&mut self, db_name: String) { info!(%db_name, "setting current namespace"); println!("You are now in remote mode, querying namespace {db_name}"); self.set_query_engine(QueryEngine::Remote(db_name)); } fn set_query_engine(&mut self, query_engine: QueryEngine) { self.prompt = match &query_engine { QueryEngine::Remote(db_name) => { format!("{db_name}> ") } }; self.query_engine = Some(query_engine) } /// Sets the output format to the specified format pub fn set_output_format<S: AsRef<str>>(&mut self, requested_format: S) -> Result<()> { let requested_format = requested_format.as_ref(); self.output_format = requested_format .parse() .context(SettingFormatSnafu { requested_format })?; println!("Set output format format to {}", self.output_format); Ok(()) } /// Prints to the specified output format fn print_results(&self, batches: &[RecordBatch]) -> Result<()> { let formatted_results = self .output_format .format(batches) .context(FormattingResultsSnafu)?; println!("{formatted_results}"); Ok(()) } } impl Drop for Repl { fn drop(&mut self) { let history_file = history_file(); if let Err(e) = self.rl.save_history(&history_file) { debug!(%e, "error saving history file"); } } } fn is_exit_command(line: &str) -> bool { let line = line.trim_end().to_lowercase(); line == "quit" || line == "exit" } /// Return the location of the history file (defaults to $HOME/".iox_sql_history") fn history_file() -> PathBuf { let mut buf = match std::env::var("HOME") { Ok(home) => PathBuf::from(home), Err(_) => PathBuf::new(), }; buf.push(".iox_sql_history"); buf }
use anyhow::Result; use clap::Parser; use maple_core::helptags::generate_tag_lines; use maple_core::paths::AbsPathBuf; use std::io::Write; use utils::read_lines; /// Parse and display Vim helptags. #[derive(Parser, Debug, Clone)] pub struct Helptags { /// Tempfile containing the info of vim helptags. #[clap(index = 1)] meta_info: AbsPathBuf, } impl Helptags { pub fn run(self) -> Result<()> { let mut lines = read_lines(self.meta_info.as_ref())?; // line 1:/doc/tags,/doc/tags-cn // line 2:&runtimepath if let Some(Ok(doc_tags)) = lines.next() { if let Some(Ok(runtimepath)) = lines.next() { let lines = generate_tag_lines(doc_tags.split(',').map(|s| s.to_string()), &runtimepath); let stdout = std::io::stdout(); let mut lock = stdout.lock(); for line in lines { writeln!(lock, "{line}")?; } } } Ok(()) } }
// Copyright (c) 2019 Jason White // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. //! Events are used by repository webhooks. //! //! See: https://developer.github.com/v3/activity/events/types/ use derive_more::From; use serde::{ de::{self, Deserializer}, Deserialize, }; use std::fmt; use std::str::FromStr; use crate::{ AppEvent, CheckRun, CheckSuite, Comment, DateTime, Installation, Issue, Label, Oid, PullRequest, Repository, Review, ShortRepo, User, }; /// GitHub events that are specified in the X-Github-Event header. #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum EventType { /// (Special event.) Any time any event is triggered (Wildcard Event). Wildcard, /// (Special event.) Sent when a webhook is added. Ping, /// Triggered when a check run is `created`, `rerequested`, `completed`, or /// has a `requested_action`. CheckRun, /// Triggered when a check suite is `completed`, `requested`, or /// `rerequested`. CheckSuite, /// Any time a Commit is commented on. CommitComment, /// Triggered when the body or comment of an issue or pull request includes /// a URL that matches a configured content reference domain. Only GitHub /// Apps can receive this event. ContentReference, /// Any time a Branch or Tag is created. Create, /// Any time a Branch or Tag is deleted. Delete, /// Any time a Repository has a new deployment created from the API. Deployment, /// Any time a deployment for a Repository has a status update from the /// API. DeploymentStatus, /// Any time a Repository is forked. Fork, /// Triggered when someone revokes their authorization of a GitHub App. GitHubAppAuthorization, /// Any time a Wiki page is updated. Gollum, /// Any time a GitHub App is installed or uninstalled. Installation, /// Same as `Installation`, but deprecated. This event is sent alongside /// the `Installation` event, but can always be ignored. IntegrationInstallation, /// Any time a repository is added or removed from an installation. InstallationRepositories, /// Same as `InstallationRepositories`, but deprecated. This event is sent /// alongside the `InstallationRepositories` event, but can always be /// ignored. IntegrationInstallationRepositories, /// Any time a comment on an issue is created, edited, or deleted. IssueComment, /// Any time an Issue is assigned, unassigned, labeled, unlabeled, /// opened, edited, milestoned, demilestoned, closed, or reopened. Issues, /// Any time a Label is created, edited, or deleted. Label, /// Any time a user purchases, cancels, or changes their GitHub /// Marketplace plan. MarketplacePurchase, /// Any time a User is added or removed as a collaborator to a /// Repository, or has their permissions modified. Member, /// Any time a User is added or removed from a team. Organization hooks /// only. Membership, /// Any time a Milestone is created, closed, opened, edited, or deleted. Milestone, /// Any time a user is added, removed, or invited to an Organization. /// Organization hooks only. Organization, /// Any time an organization blocks or unblocks a user. Organization /// hooks only. OrgBlock, /// Any time a Pages site is built or results in a failed build. PageBuild, /// Any time a Project Card is created, edited, moved, converted to an /// issue, or deleted. ProjectCard, /// Any time a Project Column is created, edited, moved, or deleted. ProjectColumn, /// Any time a Project is created, edited, closed, reopened, or deleted. Project, /// Any time a Repository changes from private to public. Public, /// Any time a pull request is assigned, unassigned, labeled, unlabeled, /// opened, edited, closed, reopened, or synchronized (updated due to a /// new push in the branch that the pull request is tracking). Also any /// time a pull request review is requested, or a review request is /// removed. PullRequest, /// Any time a comment on a pull request's unified diff is created, /// edited, or deleted (in the Files Changed tab). PullRequestReviewComment, /// Any time a pull request review is submitted, edited, or dismissed. PullRequestReview, /// Any Git push to a Repository, including editing tags or branches. /// Commits via API actions that update references are also counted. /// This is the default event. Push, /// Any time a Release is published in a Repository. Release, /// Any time a Repository is created, deleted (organization hooks /// only), archived, unarchived, made public, or made private. Repository, /// Triggered when a successful, cancelled, or failed repository import /// finishes for a GitHub organization or a personal repository. To receive /// this event for a personal repository, you must create an empty /// repository prior to the import. This event can be triggered using /// either the GitHub Importer or the Source imports API. RepositoryImport, /// Triggered when a security alert is created, dismissed, or resolved. RepositoryVulnerabilityAlert, /// Triggered when a new security advisory is published, updated, or /// withdrawn. A security advisory provides information about /// security-related vulnerabilities in software on GitHub. Security /// Advisory webhooks are available to GitHub Apps only. SecurityAdvisory, /// Any time a Repository has a status update from the API. Status, /// Any time a team is created, deleted, modified, or added to or /// removed from a repository. Organization hooks only Team, /// Any time a team is added or modified on a Repository. TeamAdd, /// Any time a User stars a Repository. Watch, } impl EventType { /// Returns a static string for the event name. pub fn name(self) -> &'static str { match self { EventType::Wildcard => "*", EventType::Ping => "ping", EventType::CheckRun => "check_run", EventType::CheckSuite => "check_suite", EventType::CommitComment => "commit_comment", EventType::ContentReference => "content_reference", EventType::Create => "create", EventType::Delete => "delete", EventType::Deployment => "deployment", EventType::DeploymentStatus => "deployment_status", EventType::Fork => "fork", EventType::GitHubAppAuthorization => "github_app_authorization", EventType::Gollum => "gollum", EventType::Installation => "installation", EventType::IntegrationInstallation => "integration_installation", EventType::InstallationRepositories => "installation_repositories", EventType::IntegrationInstallationRepositories => { "integration_installation_repositories" } EventType::IssueComment => "issue_comment", EventType::Issues => "issues", EventType::Label => "label", EventType::MarketplacePurchase => "marketplace_purchase", EventType::Member => "member", EventType::Membership => "membership", EventType::Milestone => "milestone", EventType::Organization => "organization", EventType::OrgBlock => "org_block", EventType::PageBuild => "page_build", EventType::ProjectCard => "project_card", EventType::ProjectColumn => "project_column", EventType::Project => "project", EventType::Public => "public", EventType::PullRequest => "pull_request", EventType::PullRequestReview => "pull_request_review", EventType::PullRequestReviewComment => { "pull_request_review_comment" } EventType::Push => "push", EventType::Release => "release", EventType::Repository => "repository", EventType::RepositoryImport => "repository_import", EventType::RepositoryVulnerabilityAlert => { "repository_vulnerability_alert" } EventType::SecurityAdvisory => "security_advisory", EventType::Status => "status", EventType::Team => "team", EventType::TeamAdd => "team_add", EventType::Watch => "watch", } } } impl FromStr for EventType { type Err = &'static str; fn from_str(s: &str) -> Result<Self, Self::Err> { match s { "*" => Ok(EventType::Wildcard), "ping" => Ok(EventType::Ping), "check_run" => Ok(EventType::CheckRun), "check_suite" => Ok(EventType::CheckSuite), "commit_comment" => Ok(EventType::CommitComment), "content_reference" => Ok(EventType::ContentReference), "create" => Ok(EventType::Create), "delete" => Ok(EventType::Delete), "deployment" => Ok(EventType::Deployment), "deployment_status" => Ok(EventType::DeploymentStatus), "fork" => Ok(EventType::Fork), "github_app_authorization" => Ok(EventType::GitHubAppAuthorization), "gollum" => Ok(EventType::Gollum), "installation" => Ok(EventType::Installation), "integration_installation" => { Ok(EventType::IntegrationInstallation) } "installation_repositories" => { Ok(EventType::InstallationRepositories) } "integration_installation_repositories" => { Ok(EventType::IntegrationInstallationRepositories) } "issue_comment" => Ok(EventType::IssueComment), "issues" => Ok(EventType::Issues), "label" => Ok(EventType::Label), "marketplace_purchase" => Ok(EventType::MarketplacePurchase), "member" => Ok(EventType::Member), "membership" => Ok(EventType::Membership), "milestone" => Ok(EventType::Milestone), "organization" => Ok(EventType::Organization), "org_block" => Ok(EventType::OrgBlock), "page_build" => Ok(EventType::PageBuild), "project_card" => Ok(EventType::ProjectCard), "project_column" => Ok(EventType::ProjectColumn), "project" => Ok(EventType::Project), "public" => Ok(EventType::Public), "pull_request" => Ok(EventType::PullRequest), "pull_request_review_comment" => { Ok(EventType::PullRequestReviewComment) } "pull_request_review" => Ok(EventType::PullRequestReview), "push" => Ok(EventType::Push), "release" => Ok(EventType::Release), "repository" => Ok(EventType::Repository), "repository_import" => Ok(EventType::RepositoryImport), "repository_vulnerability_alert" => { Ok(EventType::RepositoryVulnerabilityAlert) } "security_advisory" => Ok(EventType::SecurityAdvisory), "status" => Ok(EventType::Status), "team" => Ok(EventType::Team), "team_add" => Ok(EventType::TeamAdd), "watch" => Ok(EventType::Watch), _ => Err("invalid GitHub event"), } } } impl<'de> Deserialize<'de> for EventType { fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de>, { let s = String::deserialize(deserializer)?; FromStr::from_str(&s).map_err(de::Error::custom) } } impl fmt::Display for EventType { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(self.name()) } } /// An event with a corresponding payload. /// /// For documentation on each of these events, see: /// https://developer.github.com/v3/activity/events/types/ #[derive( Deserialize, From, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[allow(clippy::large_enum_variant)] pub enum Event { Ping(PingEvent), CheckRun(CheckRunEvent), CheckSuite(CheckSuiteEvent), CommitComment(CommitCommentEvent), // ContentReference(ContentReferenceEvent), Create(CreateEvent), Delete(DeleteEvent), // Deployment(DeploymentEvent), // DeploymentStatus(DeploymentStatusEvent), // Fork(ForkEvent), GitHubAppAuthorization(GitHubAppAuthorizationEvent), Gollum(GollumEvent), Installation(InstallationEvent), InstallationRepositories(InstallationRepositoriesEvent), IntegrationInstallation(IntegrationInstallationEvent), IntegrationInstallationRepositories( IntegrationInstallationRepositoriesEvent, ), IssueComment(IssueCommentEvent), Issues(IssuesEvent), Label(LabelEvent), // MarketplacePurchase(MarketplacePurchaseEvent), // Member(MemberEvent), // Membership(MembershipEvent), // Milestone(MilestoneEvent), // Organization(OrganizationEvent), // OrgBlock(OrgBlockEvent), // PageBuild(PageBuildEvent), // ProjectCard(ProjectCardEvent), // ProjectColumn(ProjectColumnEvent), // Project(ProjectEvent), // Public(PublicEvent), PullRequest(PullRequestEvent), PullRequestReview(PullRequestReviewEvent), PullRequestReviewComment(PullRequestReviewCommentEvent), Push(PushEvent), // Release(ReleaseEvent), Repository(RepositoryEvent), // RepositoryImport(RepositoryImportEvent), // RepositoryVulnerabilityAlert(RepositoryVulnerabilityAlertEvent), // SecurityAdvisory(SecurityAdvisoryEvent), // Status(StatusEvent), // Team(TeamEvent), // TeamAdd(TeamAddEvent), Watch(WatchEvent), } impl AppEvent for Event { fn installation(&self) -> Option<u64> { match self { Event::Ping(e) => e.installation(), Event::CheckRun(e) => e.installation(), Event::CheckSuite(e) => e.installation(), Event::CommitComment(e) => e.installation(), Event::Create(e) => e.installation(), Event::Delete(e) => e.installation(), Event::GitHubAppAuthorization(e) => e.installation(), Event::Gollum(e) => e.installation(), Event::Installation(e) => e.installation(), Event::InstallationRepositories(e) => e.installation(), Event::IntegrationInstallation(e) => e.installation(), Event::IntegrationInstallationRepositories(e) => e.installation(), Event::IssueComment(e) => e.installation(), Event::Issues(e) => e.installation(), Event::Label(e) => e.installation(), Event::PullRequest(e) => e.installation(), Event::PullRequestReview(e) => e.installation(), Event::PullRequestReviewComment(e) => e.installation(), Event::Push(e) => e.installation(), Event::Repository(e) => e.installation(), Event::Watch(e) => e.installation(), } } } /// The App installation ID. #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] pub struct InstallationId { pub id: u64, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] #[serde(tag = "type")] pub enum Hook { Repository(RepoHook), App(AppHook), } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct RepoHook { pub id: u64, pub name: String, pub active: bool, pub events: Vec<EventType>, pub config: HookConfig, pub updated_at: DateTime, pub created_at: DateTime, pub url: String, pub test_url: String, pub ping_url: String, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct HookConfig { pub content_type: String, pub insecure_ssl: String, pub secret: Option<String>, pub url: String, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct AppHook { pub id: u64, pub name: String, pub active: bool, pub events: Vec<EventType>, pub config: HookConfig, pub updated_at: DateTime, pub created_at: DateTime, pub app_id: u64, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct PingEvent { pub zen: String, pub hook_id: u64, pub hook: Hook, pub repository: Option<Repository>, pub sender: Option<User>, } impl AppEvent for PingEvent {} #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[serde(rename_all = "snake_case")] pub enum CheckRunEventAction { /// A new check run was created. Created, /// The `status` of the check run is `completed`. Completed, /// Someone requested to re-run your check run. Rerequested, /// Someone requested that an action be taken. For example, this `action` /// will be sent if someone clicks a "Fix it" button in the UI. RequestedAction, } /// See: https://developer.github.com/v3/activity/events/types/#checkrunevent #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct CheckRunEvent { /// The action performed. pub action: CheckRunEventAction, /// The check run. pub check_run: CheckRun, /// The repository associated with this event. pub repository: Repository, /// The user who triggered the event. pub sender: User, /// The App installation ID. pub installation: InstallationId, } impl AppEvent for CheckRunEvent { fn installation(&self) -> Option<u64> { Some(self.installation.id) } } #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[serde(rename_all = "snake_case")] pub enum CheckSuiteEventAction { Completed, Requested, Rerequested, } impl CheckSuiteEventAction { /// Returns `true` if the action indicates that the check suite is /// completed. pub fn is_completed(self) -> bool { match self { CheckSuiteEventAction::Completed => false, _ => false, } } /// Returns `true` if the action indicates that the check suite has been /// requested or re-requested. pub fn is_requested(self) -> bool { match self { CheckSuiteEventAction::Requested | CheckSuiteEventAction::Rerequested => true, _ => false, } } } /// See: https://developer.github.com/v3/activity/events/types/#checkrunevent #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct CheckSuiteEvent { /// The action performed. pub action: CheckSuiteEventAction, /// The check suite. pub check_suite: CheckSuite, /// The repository associated with this event. pub repository: Repository, /// The user who triggered the event. pub sender: User, /// The App installation ID. pub installation: InstallationId, } impl CheckSuiteEvent { /// Returns `true` if this event indicates that a check suite was requested. pub fn is_requested(&self) -> bool { self.action.is_requested() } } impl AppEvent for CheckSuiteEvent { fn installation(&self) -> Option<u64> { Some(self.installation.id) } } #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[serde(rename_all = "snake_case")] pub enum CommitCommentAction { Created, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct CommitCommentEvent { pub action: CommitCommentAction, /// The comment in question. pub comment: Comment, /// The repository associated with this event. pub repository: Repository, /// The user who triggered the event. pub sender: User, /// The App installation ID. This is only present for GitHub App events. pub installation: Option<InstallationId>, } impl AppEvent for CommitCommentEvent { fn installation(&self) -> Option<u64> { self.installation.map(|i| i.id) } } #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[serde(rename_all = "snake_case")] pub enum CreateRefType { Repository, Branch, Tag, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct CreateEvent { /// The Git ref type. pub ref_type: CreateRefType, /// The Git ref string. /// /// `None` if only a repository was created. #[serde(rename = "ref")] pub git_ref: Option<String>, /// The name of the repository's default branch (usually `master`). pub master_branch: String, /// The repository's current description. pub description: Option<String>, /// The repository associated with this event. pub repository: Repository, /// The user who triggered the event. pub sender: User, /// The App installation ID. This is only present for GitHub App events. pub installation: Option<InstallationId>, } impl AppEvent for CreateEvent { fn installation(&self) -> Option<u64> { self.installation.map(|i| i.id) } } #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[serde(rename_all = "snake_case")] pub enum DeleteRefType { Branch, Tag, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct DeleteEvent { /// The Git ref type. pub ref_type: DeleteRefType, /// The Git ref string. #[serde(rename = "ref")] pub git_ref: String, /// The repository associated with this event. pub repository: Repository, /// The user who triggered the event. pub sender: User, /// The App installation ID. This is only present for GitHub App events. pub installation: Option<InstallationId>, } impl AppEvent for DeleteEvent { fn installation(&self) -> Option<u64> { self.installation.map(|i| i.id) } } #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[serde(rename_all = "snake_case")] pub enum GitHubAppAuthorizationAction { Revoked, } /// Triggered when someone revokes their authorization of a GitHub App. A GitHub /// App receives this webhook by default and cannot unsubscribe from this event. #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct GitHubAppAuthorizationEvent { pub action: GitHubAppAuthorizationAction, /// The user who triggered the event. pub sender: User, /// The App installation ID. pub installation: InstallationId, } impl AppEvent for GitHubAppAuthorizationEvent { fn installation(&self) -> Option<u64> { Some(self.installation.id) } } #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[serde(rename_all = "snake_case")] pub enum PageAction { Created, Edited, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct PageEvent { pub page_name: String, pub title: String, pub summary: Option<String>, pub action: PageAction, pub sha: Oid, pub html_url: String, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct GollumEvent { /// The pages that were created or edited. pub pages: Vec<PageEvent>, /// The repository for which the action took place. pub repository: Repository, /// The user who triggered the event. pub sender: User, /// The App installation ID. This is only present for GitHub App events. pub installation: Option<InstallationId>, } impl AppEvent for GollumEvent { fn installation(&self) -> Option<u64> { self.installation.map(|i| i.id) } } #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[serde(rename_all = "snake_case")] pub enum InstallationAction { Created, Deleted, NewPermissionsAccepted, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct InstallationEvent { pub action: InstallationAction, pub installation: Installation, pub sender: User, } impl AppEvent for InstallationEvent { fn installation(&self) -> Option<u64> { Some(self.installation.id) } } #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[serde(rename_all = "snake_case")] pub enum InstallationRepositoriesAction { Added, Removed, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct InstallationRepositoriesEvent { pub action: InstallationRepositoriesAction, pub installation: Installation, pub repository_selection: String, pub repositories_added: Vec<ShortRepo>, pub repositories_removed: Vec<ShortRepo>, pub sender: User, } impl AppEvent for InstallationRepositoriesEvent { fn installation(&self) -> Option<u64> { Some(self.installation.id) } } /// Event deprecated by GitHub. Use `InstallationEvent` instead. #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct IntegrationInstallationEvent {} impl AppEvent for IntegrationInstallationEvent { fn installation(&self) -> Option<u64> { None } } /// Event deprecated by GitHub. Use `InstallationRepositoriesEvent` instead. #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct IntegrationInstallationRepositoriesEvent {} impl AppEvent for IntegrationInstallationRepositoriesEvent { fn installation(&self) -> Option<u64> { None } } #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[serde(rename_all = "snake_case")] pub enum IssueCommentAction { Created, Edited, Deleted, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct IssueCommentEvent { /// The action that was performed. pub action: IssueCommentAction, /// The issue associated with the comment. pub issue: Issue, /// The comment in question. pub comment: Comment, /// The repository associated with this event. pub repository: Repository, /// The user who triggered the event. pub sender: User, /// The App installation ID. This is only present for GitHub App events. pub installation: Option<InstallationId>, } impl AppEvent for IssueCommentEvent { fn installation(&self) -> Option<u64> { self.installation.map(|i| i.id) } } #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[serde(rename_all = "snake_case")] pub enum IssueAction { Opened, Edited, Deleted, Transferred, Pinned, Unpinned, Closed, Reopened, Assigned, Unassigned, Labeled, Unlabeled, Milestoned, Demilestoned, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct ChangeFrom { pub from: String, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct IssueChanges { /// A change to the body, if any. pub body: Option<ChangeFrom>, /// A change to the title, if any. pub title: Option<ChangeFrom>, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct IssuesEvent { /// The action that was performed. pub action: IssueAction, /// The issue itself. pub issue: Issue, /// Changes to the issues (if the action is `Edited`). pub changes: Option<IssueChanges>, /// The label that was added or removed (if the action is `Labeled` or /// `Unlabeled`). pub label: Option<Label>, /// The optional user who was assigned or unassigned from the issue (if the /// action is `Assigned` or `Unassigned`). pub assignee: Option<User>, /// The repository associated with this event. pub repository: Repository, /// The user who triggered the event. pub sender: User, /// The App installation ID. This is only present for GitHub App events. pub installation: Option<InstallationId>, } impl AppEvent for IssuesEvent { fn installation(&self) -> Option<u64> { self.installation.map(|i| i.id) } } #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[serde(rename_all = "snake_case")] pub enum LabelAction { Created, Edited, Deleted, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct LabelChanges { /// A change to the body, if any. pub color: Option<ChangeFrom>, /// A change to the title, if any. pub name: Option<ChangeFrom>, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct LabelEvent { /// The action that was performed. pub action: LabelAction, /// The label itself. pub label: Label, /// Changes to the issues (if the action is `Edited`). pub changes: Option<LabelChanges>, /// The repository associated with this event. pub repository: Repository, /// The user who triggered the event. pub sender: User, /// The App installation ID. This is only present for GitHub App events. pub installation: Option<InstallationId>, } impl AppEvent for LabelEvent { fn installation(&self) -> Option<u64> { self.installation.map(|i| i.id) } } #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[serde(rename_all = "snake_case")] pub enum PullRequestAction { Assigned, Unassigned, ReviewRequested, ReviewRequestRemoved, Labeled, Unlabeled, Opened, Edited, Closed, ReadyForReview, Locked, Unlocked, Reopened, Synchronize, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct PullRequestEvent { /// The action that was performed. Can be one of "assigned", "unassigned", /// "review_requested", "review_request_removed", "labeled", "unlabeled", /// "opened", "edited", "closed", or "reopened". If the action is "closed" /// and the `merged` key is `false`, the pull request was closed with /// unmerged commits. If the action is "closed" and the `merged` key is /// `true`, the pull request was merged. While webhooks are also triggered /// when a pull request is synchronized, Events API timelines don't include /// pull request events with the "synchronize" action. pub action: PullRequestAction, /// The pull request number. pub number: u64, /// The pull request itself. pub pull_request: PullRequest, /// The repository associated with this event. pub repository: Repository, /// The user who triggered the event. pub sender: User, /// The App installation ID. This is only present for GitHub App events. pub installation: Option<InstallationId>, } impl AppEvent for PullRequestEvent { fn installation(&self) -> Option<u64> { self.installation.map(|i| i.id) } } #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[serde(rename_all = "snake_case")] pub enum PullRequestReviewAction { Submitted, Edited, Dismissed, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct PullRequestReviewChanges { pub body: Option<ChangeFrom>, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct PullRequestReviewEvent { /// The action that was performed. pub action: PullRequestReviewAction, /// The review that was affected. pub review: Review, /// Changes to the review if the action is `Edited`. pub changes: Option<PullRequestReviewChanges>, /// The pull request itself. pub pull_request: PullRequest, /// The repository associated with this event. pub repository: Repository, /// The user who triggered the event. pub sender: User, /// The App installation ID. This is only present for GitHub App events. pub installation: Option<InstallationId>, } impl AppEvent for PullRequestReviewEvent { fn installation(&self) -> Option<u64> { self.installation.map(|i| i.id) } } #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[serde(rename_all = "snake_case")] pub enum PullRequestReviewCommentAction { Created, Edited, Deleted, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct PullRequestReviewCommentChanges { /// A change to the body, if any. pub body: Option<ChangeFrom>, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct PullRequestReviewCommentEvent { pub action: PullRequestReviewCommentAction, /// The changes to the comment if the action was `Edited`. pub changes: Option<PullRequestReviewCommentChanges>, /// The pull request itself. pub pull_request: PullRequest, /// The repository associated with this event. pub repository: Repository, /// The comment in question. pub comment: Comment, /// The user who triggered the event. pub sender: User, /// The App installation ID. This is only present for GitHub App events. pub installation: Option<InstallationId>, } impl AppEvent for PullRequestReviewCommentEvent { fn installation(&self) -> Option<u64> { self.installation.map(|i| i.id) } } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct Pusher { pub name: String, pub email: Option<String>, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct PushAuthor { pub name: String, pub email: Option<String>, pub username: Option<String>, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct PushCommit { pub id: Oid, pub tree_id: Oid, pub distinct: bool, pub message: String, pub timestamp: DateTime, pub url: String, pub author: PushAuthor, pub committer: PushAuthor, pub added: Vec<String>, pub removed: Vec<String>, pub modified: Vec<String>, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct PushEvent { /// The Git ref string that was pushed. #[serde(rename = "ref")] pub git_ref: String, /// The commit hash of the branch before the push. pub before: Oid, /// The commit hash of the branch after the push. pub after: Oid, /// `true` if this is a new branch. pub created: bool, /// `true` if this branch is being deleted. pub deleted: bool, /// `true` if this was a force-push. pub forced: bool, pub base_ref: Option<String>, /// The URL to compare the changes with. pub compare: String, /// The list of commits that were pushed. pub commits: Vec<PushCommit>, /// The new head commit. pub head_commit: Option<PushCommit>, /// The repository associated with this event. pub repository: Repository, /// The user who pushed the branch. This is the same as the sender, except /// with less information. pub pusher: Pusher, /// The user who triggered the event. pub sender: User, /// The App installation ID. This is only present for GitHub App events. pub installation: Option<InstallationId>, } impl AppEvent for PushEvent { fn installation(&self) -> Option<u64> { self.installation.map(|i| i.id) } } #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[serde(rename_all = "snake_case")] pub enum RepositoryAction { Created, Deleted, Archived, Unarchived, Publicized, Privatized, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct RepositoryEvent { /// The action that was performed. pub action: RepositoryAction, /// The repository associated with this event. pub repository: Repository, /// The user who triggered the event. pub sender: User, /// The App installation ID. This is only present for GitHub App events. pub installation: Option<InstallationId>, } impl AppEvent for RepositoryEvent { fn installation(&self) -> Option<u64> { self.installation.map(|i| i.id) } } #[derive( Deserialize, Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, )] #[serde(rename_all = "snake_case")] pub enum WatchAction { Started, } #[derive(Deserialize, Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct WatchEvent { /// The action that was performed. pub action: WatchAction, /// The repository associated with this event. pub repository: Repository, /// The user who triggered the event. pub sender: User, /// The App installation ID. This is only present for GitHub App events. pub installation: Option<InstallationId>, } impl AppEvent for WatchEvent { fn installation(&self) -> Option<u64> { self.installation.map(|i| i.id) } }
use crate::v0::support::{with_ipfs, MaybeTimeoutExt, StringError, StringSerialized}; use ipfs::{Ipfs, IpfsTypes, MultiaddrWithPeerId}; use serde::{Deserialize, Serialize}; use warp::{query, Filter, Rejection, Reply}; #[derive(Debug, Serialize)] #[serde(rename_all = "PascalCase")] struct Response<S: AsRef<str>> { peers: Vec<S>, } #[derive(Debug, Deserialize)] pub struct BootstrapQuery { timeout: Option<StringSerialized<humantime::Duration>>, } async fn bootstrap_query<T: IpfsTypes>( ipfs: Ipfs<T>, query: BootstrapQuery, ) -> Result<impl Reply, Rejection> { let peers = ipfs .get_bootstrappers() .maybe_timeout(query.timeout.map(StringSerialized::into_inner)) .await .map_err(StringError::from)? .map_err(StringError::from)? .into_iter() .map(|addr| addr.to_string()) .collect(); let response = Response { peers }; Ok(warp::reply::json(&response)) } pub fn bootstrap_list<T: IpfsTypes>( ipfs: &Ipfs<T>, ) -> impl Filter<Extract = (impl Reply,), Error = Rejection> + Clone { with_ipfs(ipfs) .and(query::<BootstrapQuery>()) .and_then(bootstrap_query) } #[derive(Debug, Deserialize)] pub struct BootstrapAddQuery { arg: Option<StringSerialized<MultiaddrWithPeerId>>, default: Option<bool>, timeout: Option<StringSerialized<humantime::Duration>>, } // optionally timed-out wrapper around [`Ipfs::restore_bootstrappers`] with stringified errors, used // in both bootstrap_add_query and bootstrap_restore_query async fn restore_helper<T: IpfsTypes>( ipfs: Ipfs<T>, timeout: &Option<StringSerialized<humantime::Duration>>, ) -> Result<Vec<String>, Rejection> { Ok(ipfs .restore_bootstrappers() .maybe_timeout(timeout.map(StringSerialized::into_inner)) .await .map_err(StringError::from)? .map_err(StringError::from)? .into_iter() .map(|addr| addr.to_string()) .collect()) } async fn bootstrap_add_query<T: IpfsTypes>( ipfs: Ipfs<T>, query: BootstrapAddQuery, ) -> Result<impl Reply, Rejection> { let BootstrapAddQuery { arg, default, timeout, } = query; let peers = if let Some(arg) = arg { vec![ipfs .add_bootstrapper(arg.into_inner()) .maybe_timeout(timeout.map(StringSerialized::into_inner)) .await .map_err(StringError::from)? .map_err(StringError::from)? .to_string()] } else if default == Some(true) { // HTTP api documents `?default=true` as deprecated let _ = restore_helper(ipfs, &timeout).await?; // return a list of all known bootstrap nodes as js-ipfs does ipfs::config::BOOTSTRAP_NODES .iter() .map(|&s| String::from(s)) .collect() } else { return Err(warp::reject::custom(StringError::from( "invalid query string", ))); }; let response = Response { peers }; Ok(warp::reply::json(&response)) } /// https://docs.ipfs.io/reference/http/api/#api-v0-bootstrap-add pub fn bootstrap_add<T: IpfsTypes>( ipfs: &Ipfs<T>, ) -> impl Filter<Extract = (impl Reply,), Error = Rejection> + Clone { with_ipfs(ipfs) .and(query::<BootstrapAddQuery>()) .and_then(bootstrap_add_query) } #[derive(Debug, Deserialize)] pub struct BootstrapClearQuery { timeout: Option<StringSerialized<humantime::Duration>>, } // optionally timed-out wrapper over [`Ipfs::clear_bootstrappers`] used in both // `bootstrap_clear_query` and `bootstrap_rm_query`. async fn clear_helper<T: IpfsTypes>( ipfs: Ipfs<T>, timeout: &Option<StringSerialized<humantime::Duration>>, ) -> Result<Vec<String>, Rejection> { Ok(ipfs .clear_bootstrappers() .maybe_timeout(timeout.map(StringSerialized::into_inner)) .await .map_err(StringError::from)? .map_err(StringError::from)? .into_iter() .map(|addr| addr.to_string()) .collect()) } async fn bootstrap_clear_query<T: IpfsTypes>( ipfs: Ipfs<T>, query: BootstrapClearQuery, ) -> Result<impl Reply, Rejection> { let peers = clear_helper(ipfs, &query.timeout).await?; let response = Response { peers }; Ok(warp::reply::json(&response)) } pub fn bootstrap_clear<T: IpfsTypes>( ipfs: &Ipfs<T>, ) -> impl Filter<Extract = (impl Reply,), Error = Rejection> + Clone { with_ipfs(ipfs) .and(query::<BootstrapClearQuery>()) .and_then(bootstrap_clear_query) } #[derive(Debug, Deserialize)] pub struct BootstrapRmQuery { arg: Option<StringSerialized<MultiaddrWithPeerId>>, all: Option<bool>, timeout: Option<StringSerialized<humantime::Duration>>, } async fn bootstrap_rm_query<T: IpfsTypes>( ipfs: Ipfs<T>, query: BootstrapRmQuery, ) -> Result<impl Reply, Rejection> { let BootstrapRmQuery { arg, all, timeout } = query; let peers = if let Some(arg) = arg { vec![ipfs .remove_bootstrapper(arg.into_inner()) .maybe_timeout(timeout.map(StringSerialized::into_inner)) .await .map_err(StringError::from)? .map_err(StringError::from)? .to_string()] } else if all == Some(true) { clear_helper(ipfs, &timeout).await? } else { return Err(warp::reject::custom(StringError::from( "invalid query string", ))); }; let response = Response { peers }; Ok(warp::reply::json(&response)) } pub fn bootstrap_rm<T: IpfsTypes>( ipfs: &Ipfs<T>, ) -> impl Filter<Extract = (impl Reply,), Error = Rejection> + Clone { with_ipfs(ipfs) .and(query::<BootstrapRmQuery>()) .and_then(bootstrap_rm_query) } #[derive(Debug, Deserialize)] pub struct BootstrapRestoreQuery { timeout: Option<StringSerialized<humantime::Duration>>, } async fn bootstrap_restore_query<T: IpfsTypes>( ipfs: Ipfs<T>, query: BootstrapRestoreQuery, ) -> Result<impl Reply, Rejection> { let _ = restore_helper(ipfs, &query.timeout).await?; // similar to add?default=true; returns a list of all bootstrap nodes, not only the added ones let peers = ipfs::config::BOOTSTRAP_NODES.to_vec(); let response = Response { peers }; Ok(warp::reply::json(&response)) } /// https://docs.ipfs.io/reference/http/api/#api-v0-bootstrap-add-default, similar functionality /// also available via /bootstrap/add?default=true through [`bootstrap_add`]. pub fn bootstrap_restore<T: IpfsTypes>( ipfs: &Ipfs<T>, ) -> impl Filter<Extract = (impl Reply,), Error = Rejection> + Clone { with_ipfs(ipfs) .and(query::<BootstrapRestoreQuery>()) .and_then(bootstrap_restore_query) }
use std::fs::File; use std::io::{BufRead, BufReader}; use std::path::Path; fn lines_from_file(filename: impl AsRef<Path>) -> Vec<String> { let file = File::open(filename).expect("no such file"); let buf = BufReader::new(file); buf.lines() .map(|l| l.expect("Could not parse line")) .collect() } fn part1() { let lines = lines_from_file("input.txt"); let mut group: u32 = 0; let mut qsum: u32 = 0; for line in lines { if line.is_empty() { qsum += group.count_ones(); // group done group = 0; } for c in line.chars() { let q = (c as u8) - 97; group = group | (1 << q); // println!("{}", q); } } qsum += group.count_ones(); dbg!(qsum); } fn part2() { let lines = lines_from_file("input.txt"); let mut group: u32 = 0xFFFFFFFF; let mut qsum: u32 = 0; for line in lines { if line.is_empty() { qsum += group.count_ones(); // group done group = 0xFFFFFFFF; continue; } let mut p: u32 = 0; for c in line.chars() { let q = (c as u8) - 97; p = p | (1 << q); } // bitmask and all the peoeple into group accumulator group = group & p; } qsum += group.count_ones(); dbg!(qsum); } fn main() { part1(); part2(); }
use mng::engine::GameLoop; struct MyGameLoop { running: bool, } impl MyGameLoop { pub fn new() -> MyGameLoop { MyGameLoop { running: true } } } impl GameLoop for MyGameLoop { fn is_running(&self) -> bool { self.running } fn process_events(&mut self) { println!("MyGameLoop::process_events()"); } fn fixed_update(&mut self, delta: f64) { println!("MyGameLoop::fixed_update({})", delta); } fn update(&mut self, delta: f64) { println!("MyGameLoop::update({})", delta); } fn render(&self) { println!("MyGameLoop::render()"); } } fn main() { let mut game_loop = MyGameLoop::new(); game_loop.run(); }
/// NTP v3: https://tools.ietf.org/html/rfc1305 /// NTP v4: https://tools.ietf.org/html/rfc5905 /// NTP v4 extend: https://tools.ietf.org/html/rfc7822 #[derive(Debug, Default)] #[derive(PackedStruct)] #[packed_struct(bit_numbering="msb0")] #[packed_struct(endian="msb")] pub struct NTPPacket { #[packed_field(bits="0..=1")] pub leap_indicator: u8, #[packed_field(bits="2..=4")] pub version_number: u8, #[packed_field(bits="5..=7")] pub mode: u8, #[packed_field(bits="8..=15")] pub stratum: u8, #[packed_field(bits="16..=23")] pub poll: u8, #[packed_field(bits="24..=31")] pub precision: u8, #[packed_field(bits="32..=63")] pub root_delay: u32, #[packed_field(bits="64..=95")] pub root_dispersion: u32, #[packed_field(bits="96..=127")] pub reference_id: u32, #[packed_field(bits="128..=159")] pub reference_timestamp: u32, #[packed_field(bits="160..=191")] pub reference_timestamp_fraction: u32, #[packed_field(bits="192..=223")] pub original_timestamp: u32, #[packed_field(bits="224..=255")] pub original_timestamp_fraction: u32, #[packed_field(bits="256..=287")] pub receive_timestamp: u32, #[packed_field(bits="288..=319")] pub receive_timestamp_fraction: u32, #[packed_field(bits="320..=351")] pub transmit_timestamp: u32, #[packed_field(bits="352..=383")] pub transmit_timestamp_fraction: u32, } impl NTPPacket { pub fn new() -> Self { NTPPacket { leap_indicator: 0, version_number: 3, // NTP version mode: 3, // client mode stratum: 0, poll: 0, precision: 0, root_delay: 0, root_dispersion: 0, reference_id: 0, reference_timestamp: 0, reference_timestamp_fraction: 0, original_timestamp: 0, original_timestamp_fraction: 0, receive_timestamp: 0, receive_timestamp_fraction: 0, transmit_timestamp: 0, transmit_timestamp_fraction: 0, } } }
use ansi_term::{ Color::Red, Colour::{Blue, Cyan, Green, Purple}, }; use can_dbc::{self, Message}; use pretty_hex::*; use rand::Rng; use socketcan; use std::{ fs::File, io::{self, prelude::*}, path::PathBuf, time::Instant, }; use structopt::StructOpt; use tokio::time; use tokio_socketcan::CANFrame; #[derive(Debug, StructOpt)] #[structopt( name = "cangenrb", about = "Cangen Rainbow. A colorful that generates CAN messages based on a supplied DBC file." )] struct Opt { /// Completely random frame data, unrelated to any signal #[structopt(short = "r", long = "random-frame-data")] random_frame_data: bool, /// DBC file path #[structopt(short = "i", long = "input", parse(from_os_str))] input: PathBuf, /// Send random remote transmission frames #[structopt(long = "rtr")] rtr_frames: bool, /// Send random error frames #[structopt(long = "err")] err_frames: bool, /// Frequency of sending in microseconds #[structopt(short = "f", long = "frequency", default_value = "100000")] frequency: u64, /// Only generate messages of the given transmitter (sending node) #[structopt(long = "transmitter")] transmitter: Option<String>, /// Only generate messages for the given receiver (receiving node) //#[structopt(long = "receiver")] //receiver: Option<String>, #[structopt(name = "CAN_INTERFACE")] can_interface: String, } #[tokio::main] async fn main() -> io::Result<()> { let opt = Opt::from_args(); let mut f = File::open(&opt.input)?; let mut buffer = Vec::new(); f.read_to_end(&mut buffer)?; let socket_tx = tokio_socketcan::CANSocket::open(&opt.can_interface).unwrap(); let dbc = can_dbc::DBC::from_slice(&buffer).expect("Failed to parse DBC"); // Filter messages by transmitter let dbc_messages = if let Some(transmitter) = opt.transmitter { let expected_transmitter = can_dbc::Transmitter::NodeName(transmitter); dbc.messages() .iter() .filter(|m| *m.transmitter() == expected_transmitter) .map(|m| m.to_owned()) .collect() } else { dbc.messages().clone() }; // Create signal generators let dbc_signal_range_gen = DBCSignalRangeGen { dbc_messages: dbc_messages.clone(), err_frames: opt.err_frames, rtr_frames: opt.rtr_frames, }; let random_frame_data_gen = RandomFrameDataGen { dbc_messages: dbc_messages.clone(), err_frames: opt.err_frames, rtr_frames: opt.rtr_frames, }; let mut messages_sent_counter: u128 = 0; let now = Instant::now(); let mut interval = time::interval(time::Duration::from_micros(opt.frequency)); loop { interval.tick().await; let can_frame = if opt.random_frame_data { random_frame_data_gen.gen() } else { dbc_signal_range_gen.gen() }; socket_tx.write_frame(can_frame).unwrap().await.unwrap(); messages_sent_counter += 1; let message_througput = messages_sent_counter as f64 / now.elapsed().as_secs() as f64; println!( "✉ #{} ✉ {:.2}msgs/s ⧖ {}ms", messages_sent_counter, message_througput, now.elapsed().as_millis() ); } } trait CanFrameGenStrategy: Send { fn gen(&self) -> CANFrame; } /// Generates signal values based on a given DBC messages. /// Signals offset and width is based on the DBC. /// Random signal values are generated within the range that is specified in the DBC. struct DBCSignalRangeGen { dbc_messages: Vec<Message>, rtr_frames: bool, err_frames: bool, } impl CanFrameGenStrategy for DBCSignalRangeGen { fn gen(&self) -> CANFrame { let mut rng = rand::thread_rng(); let message_idx: usize = rng.gen_range(0, self.dbc_messages.len() - 1); let message = self.dbc_messages.get(message_idx).unwrap(); println!("\n{}", Purple.paint(message.message_name())); let rtr_rand = if self.rtr_frames { rand::random() } else { false }; let err_rand = if self.err_frames { rand::random() } else { false }; let rand_frame_data = if *message.message_size() > 8 { println!("Non random message body due to currently unsupported size `{}` - id: `{:x}`. Size {} > 8", message.message_name(), message.message_id().0, message.message_size()); [0; 8] } else { self.gen_msg_frame_data(&message) }; println!( "→ ERR: {} RTR: {} Data: {}", err_rand, rtr_rand, rand_frame_data.to_vec().hex_dump() ); let message_id = message.message_id().0 & socketcan::EFF_MASK; CANFrame::new(message_id, &rand_frame_data, rtr_rand, err_rand) .expect("Failed to create frame") } } impl DBCSignalRangeGen { fn gen_msg_frame_data(&self, message: &can_dbc::Message) -> [u8; 8] { let mut frame_data_rand: u64 = 0; let mut rng = rand::thread_rng(); for signal in message.signals() { let actual_value: f64 = if signal.min() == signal.max() { println!( "Min and max value `{} = {}` match for signal {}, can not create random value.", signal.min(), signal.max(), signal.name() ); *signal.min() } else { rng.gen_range(signal.min(), signal.max()) }; let random_signal_value = (actual_value - signal.offset) / signal.factor; let bit_mask: u64 = 2u64.pow(*signal.signal_size() as u32) - 1; let min_s = format!("{}", signal.min()); let max_s = format!("{}", signal.max()); // let actual_value_s = format!("{:6.4}", (actual_value as u64 & bit_mask) as f64); let actual_value_s = format!("{:6.4}", actual_value); println!( "{:10.10} min {:6.4} max {:6.4} → value {}", Green.paint(signal.name()), Blue.paint(min_s), Red.paint(max_s), Cyan.paint(actual_value_s), ); assert!(actual_value >= *signal.min()); assert!(actual_value <= *signal.max()); let shifted_signal_value = (random_signal_value as u64 & bit_mask) << (signal.start_bit as u8); frame_data_rand |= shifted_signal_value; } frame_data_rand.to_le_bytes() } } /// Generate random frame payloads. The generated payload does not conform to the DBC. /// DBC message ids are based on the given DBC. struct RandomFrameDataGen { dbc_messages: Vec<Message>, rtr_frames: bool, err_frames: bool, } impl CanFrameGenStrategy for RandomFrameDataGen { fn gen(&self) -> CANFrame { let mut rng = rand::thread_rng(); let message_idx: usize = rng.gen_range(0, self.dbc_messages.len() - 1); let message = self.dbc_messages.get(message_idx).unwrap(); println!("\n{}", Purple.paint(message.message_name())); let rtr_rand = if self.rtr_frames { rand::random() } else { false }; let err_rand = if self.err_frames { rand::random() } else { false }; let mut rand_frame_data: [u8; 8] = [0; 8]; rng.fill(&mut rand_frame_data[..]); println!( "→ ERR: {} RTR: {} Data: {}", err_rand, rtr_rand, rand_frame_data.to_vec().hex_dump() ); let message_id = message.message_id().0 & socketcan::EFF_MASK; CANFrame::new(message_id, &rand_frame_data, rtr_rand, err_rand) .expect("Failed to create frame") } }
//! Implement syscalls using the vDSO. //! //! <https://man7.org/linux/man-pages/man7/vdso.7.html> //! //! # Safety //! //! Similar to syscalls.rs, this file performs raw system calls, and sometimes //! passes them uninitialized memory buffers. This file also calls vDSO //! functions. #![allow(unsafe_code)] #[cfg(target_arch = "x86")] use super::reg::{ArgReg, RetReg, SyscallNumber, A0, A1, A2, A3, A4, A5, R0}; use super::vdso; #[cfg(target_arch = "x86")] use core::arch::global_asm; use core::mem::transmute; use core::ptr::null_mut; use core::sync::atomic::AtomicPtr; use core::sync::atomic::Ordering::Relaxed; #[cfg(target_pointer_width = "32")] #[cfg(feature = "time")] use linux_raw_sys::general::timespec as __kernel_old_timespec; #[cfg(feature = "time")] use { super::c, super::conv::{c_int, ret}, crate::clockid::{ClockId, DynamicClockId}, crate::io, crate::timespec::Timespec, core::mem::MaybeUninit, linux_raw_sys::general::{__kernel_clockid_t, __kernel_timespec}, }; #[cfg(feature = "time")] #[inline] pub(crate) fn clock_gettime(which_clock: ClockId) -> __kernel_timespec { // SAFETY: `CLOCK_GETTIME` contains either null or the address of a // function with an ABI like libc `clock_gettime`, and calling it has // the side effect of writing to the result buffer, and no others. unsafe { let mut result = MaybeUninit::<__kernel_timespec>::uninit(); let callee = match transmute(CLOCK_GETTIME.load(Relaxed)) { Some(callee) => callee, None => init_clock_gettime(), }; let r0 = callee(which_clock as c::c_int, result.as_mut_ptr()); // The `ClockId` enum only contains clocks which never fail. It may be // tempting to change this to `debug_assert_eq`, however they can still // fail on uncommon kernel configs, so we leave this in place to ensure // that we don't execute undefined behavior if they ever do fail. assert_eq!(r0, 0); result.assume_init() } } #[cfg(feature = "time")] #[inline] pub(crate) fn clock_gettime_dynamic(which_clock: DynamicClockId<'_>) -> io::Result<Timespec> { let id = match which_clock { DynamicClockId::Known(id) => id as __kernel_clockid_t, DynamicClockId::Dynamic(fd) => { // See `FD_TO_CLOCKID` in Linux's `clock_gettime` documentation. use crate::backend::fd::AsRawFd; const CLOCKFD: i32 = 3; ((!fd.as_raw_fd() << 3) | CLOCKFD) as __kernel_clockid_t } DynamicClockId::RealtimeAlarm => { linux_raw_sys::general::CLOCK_REALTIME_ALARM as __kernel_clockid_t } DynamicClockId::Tai => linux_raw_sys::general::CLOCK_TAI as __kernel_clockid_t, DynamicClockId::Boottime => linux_raw_sys::general::CLOCK_BOOTTIME as __kernel_clockid_t, DynamicClockId::BoottimeAlarm => { linux_raw_sys::general::CLOCK_BOOTTIME_ALARM as __kernel_clockid_t } }; // SAFETY: `CLOCK_GETTIME` contains either null or the address of a // function with an ABI like libc `clock_gettime`, and calling it has // the side effect of writing to the result buffer, and no others. unsafe { const EINVAL: c::c_int = -(c::EINVAL as c::c_int); let mut timespec = MaybeUninit::<Timespec>::uninit(); let callee = match transmute(CLOCK_GETTIME.load(Relaxed)) { Some(callee) => callee, None => init_clock_gettime(), }; match callee(id, timespec.as_mut_ptr()) { 0 => (), EINVAL => return Err(io::Errno::INVAL), _ => _rustix_clock_gettime_via_syscall(id, timespec.as_mut_ptr())?, } Ok(timespec.assume_init()) } } #[cfg(target_arch = "x86")] pub(super) mod x86_via_vdso { use super::{transmute, ArgReg, Relaxed, RetReg, SyscallNumber, A0, A1, A2, A3, A4, A5, R0}; use crate::backend::arch::asm; #[inline] pub(in crate::backend) unsafe fn syscall0(nr: SyscallNumber<'_>) -> RetReg<R0> { let callee = match transmute(super::SYSCALL.load(Relaxed)) { Some(callee) => callee, None => super::init_syscall(), }; asm::indirect_syscall0(callee, nr) } #[inline] pub(in crate::backend) unsafe fn syscall1<'a>( nr: SyscallNumber<'a>, a0: ArgReg<'a, A0>, ) -> RetReg<R0> { let callee = match transmute(super::SYSCALL.load(Relaxed)) { Some(callee) => callee, None => super::init_syscall(), }; asm::indirect_syscall1(callee, nr, a0) } #[inline] pub(in crate::backend) unsafe fn syscall1_noreturn<'a>( nr: SyscallNumber<'a>, a0: ArgReg<'a, A0>, ) -> ! { let callee = match transmute(super::SYSCALL.load(Relaxed)) { Some(callee) => callee, None => super::init_syscall(), }; asm::indirect_syscall1_noreturn(callee, nr, a0) } #[inline] pub(in crate::backend) unsafe fn syscall2<'a>( nr: SyscallNumber<'a>, a0: ArgReg<'a, A0>, a1: ArgReg<'a, A1>, ) -> RetReg<R0> { let callee = match transmute(super::SYSCALL.load(Relaxed)) { Some(callee) => callee, None => super::init_syscall(), }; asm::indirect_syscall2(callee, nr, a0, a1) } #[inline] pub(in crate::backend) unsafe fn syscall3<'a>( nr: SyscallNumber<'a>, a0: ArgReg<'a, A0>, a1: ArgReg<'a, A1>, a2: ArgReg<'a, A2>, ) -> RetReg<R0> { let callee = match transmute(super::SYSCALL.load(Relaxed)) { Some(callee) => callee, None => super::init_syscall(), }; asm::indirect_syscall3(callee, nr, a0, a1, a2) } #[inline] pub(in crate::backend) unsafe fn syscall4<'a>( nr: SyscallNumber<'a>, a0: ArgReg<'a, A0>, a1: ArgReg<'a, A1>, a2: ArgReg<'a, A2>, a3: ArgReg<'a, A3>, ) -> RetReg<R0> { let callee = match transmute(super::SYSCALL.load(Relaxed)) { Some(callee) => callee, None => super::init_syscall(), }; asm::indirect_syscall4(callee, nr, a0, a1, a2, a3) } #[inline] pub(in crate::backend) unsafe fn syscall5<'a>( nr: SyscallNumber<'a>, a0: ArgReg<'a, A0>, a1: ArgReg<'a, A1>, a2: ArgReg<'a, A2>, a3: ArgReg<'a, A3>, a4: ArgReg<'a, A4>, ) -> RetReg<R0> { let callee = match transmute(super::SYSCALL.load(Relaxed)) { Some(callee) => callee, None => super::init_syscall(), }; asm::indirect_syscall5(callee, nr, a0, a1, a2, a3, a4) } #[inline] pub(in crate::backend) unsafe fn syscall6<'a>( nr: SyscallNumber<'a>, a0: ArgReg<'a, A0>, a1: ArgReg<'a, A1>, a2: ArgReg<'a, A2>, a3: ArgReg<'a, A3>, a4: ArgReg<'a, A4>, a5: ArgReg<'a, A5>, ) -> RetReg<R0> { let callee = match transmute(super::SYSCALL.load(Relaxed)) { Some(callee) => callee, None => super::init_syscall(), }; asm::indirect_syscall6(callee, nr, a0, a1, a2, a3, a4, a5) } // With the indirect call, it isn't meaningful to do a separate // `_readonly` optimization. #[allow(unused_imports)] pub(in crate::backend) use { syscall0 as syscall0_readonly, syscall1 as syscall1_readonly, syscall2 as syscall2_readonly, syscall3 as syscall3_readonly, syscall4 as syscall4_readonly, syscall5 as syscall5_readonly, syscall6 as syscall6_readonly, }; } #[cfg(feature = "time")] type ClockGettimeType = unsafe extern "C" fn(c::c_int, *mut Timespec) -> c::c_int; /// The underlying syscall functions are only called from asm, using the /// special syscall calling convention to pass arguments and return values, /// which the signature here doesn't reflect. #[cfg(target_arch = "x86")] pub(super) type SyscallType = unsafe extern "C" fn(); /// Initialize `CLOCK_GETTIME` and return its value. #[cfg(feature = "time")] #[cold] fn init_clock_gettime() -> ClockGettimeType { init(); // SAFETY: Load the function address from static storage that we // just initialized. unsafe { transmute(CLOCK_GETTIME.load(Relaxed)) } } /// Initialize `SYSCALL` and return its value. #[cfg(target_arch = "x86")] #[cold] fn init_syscall() -> SyscallType { init(); // SAFETY: Load the function address from static storage that we // just initialized. unsafe { transmute(SYSCALL.load(Relaxed)) } } /// `AtomicPtr` can't hold a `fn` pointer, so we use a `*` pointer to this /// placeholder type, and cast it as needed. struct Function; #[cfg(feature = "time")] static mut CLOCK_GETTIME: AtomicPtr<Function> = AtomicPtr::new(null_mut()); #[cfg(target_arch = "x86")] static mut SYSCALL: AtomicPtr<Function> = AtomicPtr::new(null_mut()); #[cfg(feature = "time")] unsafe extern "C" fn rustix_clock_gettime_via_syscall( clockid: c::c_int, res: *mut Timespec, ) -> c::c_int { match _rustix_clock_gettime_via_syscall(clockid, res) { Ok(()) => 0, Err(err) => err.raw_os_error().wrapping_neg(), } } #[cfg(feature = "time")] #[cfg(target_pointer_width = "32")] unsafe fn _rustix_clock_gettime_via_syscall( clockid: c::c_int, res: *mut Timespec, ) -> io::Result<()> { let r0 = syscall!(__NR_clock_gettime64, c_int(clockid), res); match ret(r0) { Err(io::Errno::NOSYS) => _rustix_clock_gettime_via_syscall_old(clockid, res), otherwise => otherwise, } } #[cfg(feature = "time")] #[cfg(target_pointer_width = "32")] unsafe fn _rustix_clock_gettime_via_syscall_old( clockid: c::c_int, res: *mut Timespec, ) -> io::Result<()> { // Ordinarily `rustix` doesn't like to emulate system calls, but in // the case of time APIs, it's specific to Linux, specific to // 32-bit architectures *and* specific to old kernel versions, and // it's not that hard to fix up here, so that no other code needs // to worry about this. let mut old_result = MaybeUninit::<__kernel_old_timespec>::uninit(); let r0 = syscall!(__NR_clock_gettime, c_int(clockid), &mut old_result); match ret(r0) { Ok(()) => { let old_result = old_result.assume_init(); *res = Timespec { tv_sec: old_result.tv_sec.into(), tv_nsec: old_result.tv_nsec.into(), }; Ok(()) } otherwise => otherwise, } } #[cfg(feature = "time")] #[cfg(target_pointer_width = "64")] unsafe fn _rustix_clock_gettime_via_syscall( clockid: c::c_int, res: *mut Timespec, ) -> io::Result<()> { ret(syscall!(__NR_clock_gettime, c_int(clockid), res)) } #[cfg(target_arch = "x86")] extern "C" { /// A symbol pointing to an `int 0x80` instruction. This “function” is only /// called from assembly, and only with the x86 syscall calling convention. /// so its signature here is not its true signature. /// /// This extern block and the `global_asm!` below can be replaced with /// `#[naked]` if it's stabilized. fn rustix_int_0x80(); } #[cfg(target_arch = "x86")] global_asm!( r#" .section .text.rustix_int_0x80,"ax",@progbits .p2align 4 .weak rustix_int_0x80 .hidden rustix_int_0x80 .type rustix_int_0x80, @function rustix_int_0x80: .cfi_startproc int 0x80 ret .cfi_endproc .size rustix_int_0x80, .-rustix_int_0x80 "# ); fn minimal_init() { // SAFETY: Store default function addresses in static storage so that if we // end up making any system calls while we read the vDSO, they'll work. // If the memory happens to already be initialized, this is redundant, but // not harmful. unsafe { #[cfg(feature = "time")] { CLOCK_GETTIME .compare_exchange( null_mut(), rustix_clock_gettime_via_syscall as *mut Function, Relaxed, Relaxed, ) .ok(); } #[cfg(target_arch = "x86")] { SYSCALL .compare_exchange( null_mut(), rustix_int_0x80 as *mut Function, Relaxed, Relaxed, ) .ok(); } } } fn init() { minimal_init(); if let Some(vdso) = vdso::Vdso::new() { #[cfg(feature = "time")] { // Look up the platform-specific `clock_gettime` symbol as documented // [here], except on 32-bit platforms where we look up the // `64`-suffixed variant and fail if we don't find it. // // [here]: https://man7.org/linux/man-pages/man7/vdso.7.html #[cfg(target_arch = "x86_64")] let ptr = vdso.sym(cstr!("LINUX_2.6"), cstr!("__vdso_clock_gettime")); #[cfg(target_arch = "arm")] let ptr = vdso.sym(cstr!("LINUX_2.6"), cstr!("__vdso_clock_gettime64")); #[cfg(target_arch = "aarch64")] let ptr = vdso.sym(cstr!("LINUX_2.6.39"), cstr!("__kernel_clock_gettime")); #[cfg(target_arch = "x86")] let ptr = vdso.sym(cstr!("LINUX_2.6"), cstr!("__vdso_clock_gettime64")); #[cfg(target_arch = "riscv64")] let ptr = vdso.sym(cstr!("LINUX_4.15"), cstr!("__vdso_clock_gettime")); #[cfg(target_arch = "powerpc64")] let ptr = vdso.sym(cstr!("LINUX_2.6.15"), cstr!("__kernel_clock_gettime")); #[cfg(any(target_arch = "mips", target_arch = "mips32r6"))] let ptr = vdso.sym(cstr!("LINUX_2.6"), cstr!("__vdso_clock_gettime64")); #[cfg(any(target_arch = "mips64", target_arch = "mips64r6"))] let ptr = vdso.sym(cstr!("LINUX_2.6"), cstr!("__vdso_clock_gettime")); // On all 64-bit platforms, the 64-bit `clock_gettime` symbols are // always available. #[cfg(target_pointer_width = "64")] let ok = true; // On some 32-bit platforms, the 64-bit `clock_gettime` symbols are not // available on older kernel versions. #[cfg(any( target_arch = "arm", target_arch = "mips", target_arch = "mips32r6", target_arch = "x86" ))] let ok = !ptr.is_null(); if ok { assert!(!ptr.is_null()); // SAFETY: Store the computed function addresses in static storage // so that we don't need to compute it again (but if we do, it // doesn't hurt anything). unsafe { CLOCK_GETTIME.store(ptr.cast(), Relaxed); } } } // On x86, also look up the vsyscall entry point. #[cfg(target_arch = "x86")] { let ptr = vdso.sym(cstr!("LINUX_2.5"), cstr!("__kernel_vsyscall")); assert!(!ptr.is_null()); // SAFETY: As above, store the computed function addresses in // static storage. unsafe { SYSCALL.store(ptr.cast(), Relaxed); } } } }
#![allow(non_snake_case)] // Setup types and consts type brute_num = f32; const RAND_UPPER_LIMIT: usize = 5; const RAND_LOWER_LIMIT: usize = 0; const DEBUG: bool = false; extern crate rand; use rand::{thread_rng, Rng}; extern crate clap; use clap::{Arg, App}; fn main() { let matches = App::new("brutecorr") .version("1.0") .author("Avery Wagar <ajmw.subs@gmail.com>") .about("Brute force Pearson Correlational Coeffiecents") .arg(Arg::with_name("target") .allow_hyphen_values(true) .short("t") .long("target") .value_name("TARGET") .help("set the Pearson Correlational Coeffiecent") .takes_value(true) .required(true)) .arg(Arg::with_name("L1") // .short("l") // .long("list") .value_name("L1") // .help("set L1") .takes_value(true) .required(true) .index(1)) .arg(Arg::with_name("error") .allow_hyphen_values(true) .short("e") .long("error") .value_name("ERROR") .help("(Optional) set room for error (eg. 0.1, 0.001). WARNING: making this a very low decimal will cause brutecorr to crash!") .takes_value(true)) .arg(Arg::with_name("v") .short("v") .multiple(true) .help("(Optional) Sets the level of verbosity")) .get_matches(); // Error handling let error = matches.value_of("error").unwrap_or("0.1").parse::<brute_num>().unwrap(); // Warn user of crash if error <= 0.0 { panic!("Error value is too small. Stoppping!"); } else if error <= 0.00001 { println!("Low error value, crash is imminent!") } else if error <= 0.0001 { println!("Low error value, crash is very likely!") } else if error <= 0.001 { println!("Low error value, crash is likely!") } else if error < 0.01 { println!("Low error value, crash is possible."); } else if error >= 1.0 { panic!("Error value is too large. Stopping!") } // Get target CC let target: brute_num = matches.value_of("target").unwrap().parse().unwrap(); // Get list 1 let input = matches.value_of("L1").unwrap(); // Parse in to Vec<brute_num> let L1: Vec<brute_num> = input.split_whitespace().map(| word| word.parse::<brute_num>().unwrap_or(0.0)).collect(); // Check if L1 is longer than 1 if L1.len() < 1 { panic!("Not enough values in L1"); } // Brute force row 2 let L2 = brute_force_correlation(&L1, target, error, 0 as usize); // Print out result println!("Row 1: {:?}", L1); println!("Row 2: {:?}", L2); } /// Brute forcing algorithm for Correralation Coefficents fn brute_force_correlation(L1: &[brute_num], goal: brute_num, variation: brute_num, counter: usize) -> Vec<brute_num>{ // Generate random list of numbers let L2 = generateL2(L1); // println!("L2: {:?}\nlen: {}", L2, L2.len()); // println!("L1: {:?}\nlen: {}", L1, L1.len()); if DEBUG{ println!("Attempt: {}", counter); } // get Correralation Coefficents let cor = correlation(L1, &L2); // check against goal if goal - variation <= cor && cor <= goal + variation { // If CC is close to goal then return and tell user println!("Result Found!\nTook {} attempts.\nr = {}", counter, cor); return L2 } else { // Recurse return brute_force_correlation(L1, goal, variation, counter + 1) } } fn generateL2(L1: &[brute_num]) -> Vec<brute_num>{ // let n = L1.len().to_owned(); let mut L2: Vec<brute_num> = Vec::new(); for _i in 0..L1.len() { L2.push(thread_rng().gen_range(RAND_LOWER_LIMIT, RAND_UPPER_LIMIT) as brute_num); } L2 } fn correlation(listX: &[brute_num], listY: &[brute_num]) -> brute_num { let n = listX.len() as brute_num; let p = listY.len() as brute_num; if n != p { panic!("L1 and L2 are not the same length."); } let Exy: brute_num = maximumSOP(listX, listY); let Ex: brute_num = listX.iter().sum(); let Ey: brute_num = listY.iter().sum(); let Ex2: brute_num = squareSum(listX); let Ey2: brute_num = squareSum(listY); return ((n * Exy) - (Ex * Ey)) / ((n * Ex2 - (Ex * Ex)) * ((n * Ey2 - (Ey * Ey)))).sqrt() as brute_num } fn squareSum(v: &[brute_num]) -> brute_num { v.iter().fold(0., |sum, &num| sum + num*num) } fn maximumSOP(listX: &[brute_num], listY: &[brute_num]) -> brute_num { let mut sop = 0.0; let n = listY.len(); for i in 0..n { sop = sop + listY[i] * listX[i] } sop }
// Copyright 2018 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use std::default::Default; /// Seek position inside a directory. This traversal expect the directory to store entries in /// alphabetical order, a traversal position is then a name of the entry that was returned last. /// Dot is a special entry that is considered to sort before all the other entries. #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug)] pub enum AlphabeticalTraversal { /// Position before the very first element. Traversal should continue from the "." entry. Start, /// Dot was returned last. "." is considered to be the first entry. Traversal should continue /// from the very first named entry. Dot, /// Name of the entry that was returned last. Traversal should continue from an entry that /// comes after this one in alphabetical order. Name(String), /// The whole listing was traversed. There is nothing else to return. End, } /// The default value specifies a traversal that is positioned before the very first entry. impl Default for AlphabeticalTraversal { fn default() -> Self { AlphabeticalTraversal::Start } }
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] pub const ACTRL_DS_CONTROL_ACCESS: u32 = 256u32; pub const ACTRL_DS_CREATE_CHILD: u32 = 1u32; pub const ACTRL_DS_DELETE_CHILD: u32 = 2u32; pub const ACTRL_DS_DELETE_TREE: u32 = 64u32; pub const ACTRL_DS_LIST: u32 = 4u32; pub const ACTRL_DS_LIST_OBJECT: u32 = 128u32; pub const ACTRL_DS_OPEN: u32 = 0u32; pub const ACTRL_DS_READ_PROP: u32 = 16u32; pub const ACTRL_DS_SELF: u32 = 8u32; pub const ACTRL_DS_WRITE_PROP: u32 = 32u32; pub const ADAM_REPL_AUTHENTICATION_MODE_MUTUAL_AUTH_REQUIRED: u32 = 2u32; pub const ADAM_REPL_AUTHENTICATION_MODE_NEGOTIATE: u32 = 1u32; pub const ADAM_REPL_AUTHENTICATION_MODE_NEGOTIATE_PASS_THROUGH: u32 = 0u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADSI_DIALECT_ENUM(pub i32); pub const ADSI_DIALECT_LDAP: ADSI_DIALECT_ENUM = ADSI_DIALECT_ENUM(0i32); pub const ADSI_DIALECT_SQL: ADSI_DIALECT_ENUM = ADSI_DIALECT_ENUM(1i32); impl ::core::convert::From<i32> for ADSI_DIALECT_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADSI_DIALECT_ENUM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADSPROPERROR { pub hwndPage: super::super::Foundation::HWND, pub pszPageTitle: super::super::Foundation::PWSTR, pub pszObjPath: super::super::Foundation::PWSTR, pub pszObjClass: super::super::Foundation::PWSTR, pub hr: ::windows::core::HRESULT, pub pszError: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ADSPROPERROR {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADSPROPERROR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADSPROPERROR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADSPROPERROR").field("hwndPage", &self.hwndPage).field("pszPageTitle", &self.pszPageTitle).field("pszObjPath", &self.pszObjPath).field("pszObjClass", &self.pszObjClass).field("hr", &self.hr).field("pszError", &self.pszError).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADSPROPERROR { fn eq(&self, other: &Self) -> bool { self.hwndPage == other.hwndPage && self.pszPageTitle == other.pszPageTitle && self.pszObjPath == other.pszObjPath && self.pszObjClass == other.pszObjClass && self.hr == other.hr && self.pszError == other.pszError } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADSPROPERROR {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADSPROPERROR { type Abi = Self; } #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADSPROPINITPARAMS { pub dwSize: u32, pub dwFlags: u32, pub hr: ::windows::core::HRESULT, pub pDsObj: ::core::option::Option<IDirectoryObject>, pub pwzCN: super::super::Foundation::PWSTR, pub pWritableAttrs: *mut ADS_ATTR_INFO, } #[cfg(feature = "Win32_Foundation")] impl ADSPROPINITPARAMS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADSPROPINITPARAMS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADSPROPINITPARAMS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADSPROPINITPARAMS").field("dwSize", &self.dwSize).field("dwFlags", &self.dwFlags).field("hr", &self.hr).field("pDsObj", &self.pDsObj).field("pwzCN", &self.pwzCN).field("pWritableAttrs", &self.pWritableAttrs).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADSPROPINITPARAMS { fn eq(&self, other: &Self) -> bool { self.dwSize == other.dwSize && self.dwFlags == other.dwFlags && self.hr == other.hr && self.pDsObj == other.pDsObj && self.pwzCN == other.pwzCN && self.pWritableAttrs == other.pWritableAttrs } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADSPROPINITPARAMS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADSPROPINITPARAMS { type Abi = ::core::mem::ManuallyDrop<Self>; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADSTYPEENUM(pub i32); pub const ADSTYPE_INVALID: ADSTYPEENUM = ADSTYPEENUM(0i32); pub const ADSTYPE_DN_STRING: ADSTYPEENUM = ADSTYPEENUM(1i32); pub const ADSTYPE_CASE_EXACT_STRING: ADSTYPEENUM = ADSTYPEENUM(2i32); pub const ADSTYPE_CASE_IGNORE_STRING: ADSTYPEENUM = ADSTYPEENUM(3i32); pub const ADSTYPE_PRINTABLE_STRING: ADSTYPEENUM = ADSTYPEENUM(4i32); pub const ADSTYPE_NUMERIC_STRING: ADSTYPEENUM = ADSTYPEENUM(5i32); pub const ADSTYPE_BOOLEAN: ADSTYPEENUM = ADSTYPEENUM(6i32); pub const ADSTYPE_INTEGER: ADSTYPEENUM = ADSTYPEENUM(7i32); pub const ADSTYPE_OCTET_STRING: ADSTYPEENUM = ADSTYPEENUM(8i32); pub const ADSTYPE_UTC_TIME: ADSTYPEENUM = ADSTYPEENUM(9i32); pub const ADSTYPE_LARGE_INTEGER: ADSTYPEENUM = ADSTYPEENUM(10i32); pub const ADSTYPE_PROV_SPECIFIC: ADSTYPEENUM = ADSTYPEENUM(11i32); pub const ADSTYPE_OBJECT_CLASS: ADSTYPEENUM = ADSTYPEENUM(12i32); pub const ADSTYPE_CASEIGNORE_LIST: ADSTYPEENUM = ADSTYPEENUM(13i32); pub const ADSTYPE_OCTET_LIST: ADSTYPEENUM = ADSTYPEENUM(14i32); pub const ADSTYPE_PATH: ADSTYPEENUM = ADSTYPEENUM(15i32); pub const ADSTYPE_POSTALADDRESS: ADSTYPEENUM = ADSTYPEENUM(16i32); pub const ADSTYPE_TIMESTAMP: ADSTYPEENUM = ADSTYPEENUM(17i32); pub const ADSTYPE_BACKLINK: ADSTYPEENUM = ADSTYPEENUM(18i32); pub const ADSTYPE_TYPEDNAME: ADSTYPEENUM = ADSTYPEENUM(19i32); pub const ADSTYPE_HOLD: ADSTYPEENUM = ADSTYPEENUM(20i32); pub const ADSTYPE_NETADDRESS: ADSTYPEENUM = ADSTYPEENUM(21i32); pub const ADSTYPE_REPLICAPOINTER: ADSTYPEENUM = ADSTYPEENUM(22i32); pub const ADSTYPE_FAXNUMBER: ADSTYPEENUM = ADSTYPEENUM(23i32); pub const ADSTYPE_EMAIL: ADSTYPEENUM = ADSTYPEENUM(24i32); pub const ADSTYPE_NT_SECURITY_DESCRIPTOR: ADSTYPEENUM = ADSTYPEENUM(25i32); pub const ADSTYPE_UNKNOWN: ADSTYPEENUM = ADSTYPEENUM(26i32); pub const ADSTYPE_DN_WITH_BINARY: ADSTYPEENUM = ADSTYPEENUM(27i32); pub const ADSTYPE_DN_WITH_STRING: ADSTYPEENUM = ADSTYPEENUM(28i32); impl ::core::convert::From<i32> for ADSTYPEENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADSTYPEENUM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADSVALUE { pub dwType: ADSTYPEENUM, pub Anonymous: ADSVALUE_0, } #[cfg(feature = "Win32_Foundation")] impl ADSVALUE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADSVALUE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADSVALUE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADSVALUE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADSVALUE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union ADSVALUE_0 { pub DNString: *mut u16, pub CaseExactString: *mut u16, pub CaseIgnoreString: *mut u16, pub PrintableString: *mut u16, pub NumericString: *mut u16, pub Boolean: u32, pub Integer: u32, pub OctetString: ADS_OCTET_STRING, pub UTCTime: super::super::Foundation::SYSTEMTIME, pub LargeInteger: i64, pub ClassName: *mut u16, pub ProviderSpecific: ADS_PROV_SPECIFIC, pub pCaseIgnoreList: *mut ADS_CASEIGNORE_LIST, pub pOctetList: *mut ADS_OCTET_LIST, pub pPath: *mut ADS_PATH, pub pPostalAddress: *mut ADS_POSTALADDRESS, pub Timestamp: ADS_TIMESTAMP, pub BackLink: ADS_BACKLINK, pub pTypedName: *mut ADS_TYPEDNAME, pub Hold: ADS_HOLD, pub pNetAddress: *mut ADS_NETADDRESS, pub pReplicaPointer: *mut ADS_REPLICAPOINTER, pub pFaxNumber: *mut ADS_FAXNUMBER, pub Email: ADS_EMAIL, pub SecurityDescriptor: ADS_NT_SECURITY_DESCRIPTOR, pub pDNWithBinary: *mut ADS_DN_WITH_BINARY, pub pDNWithString: *mut ADS_DN_WITH_STRING, } #[cfg(feature = "Win32_Foundation")] impl ADSVALUE_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADSVALUE_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADSVALUE_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADSVALUE_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADSVALUE_0 { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_ACEFLAG_ENUM(pub i32); pub const ADS_ACEFLAG_INHERIT_ACE: ADS_ACEFLAG_ENUM = ADS_ACEFLAG_ENUM(2i32); pub const ADS_ACEFLAG_NO_PROPAGATE_INHERIT_ACE: ADS_ACEFLAG_ENUM = ADS_ACEFLAG_ENUM(4i32); pub const ADS_ACEFLAG_INHERIT_ONLY_ACE: ADS_ACEFLAG_ENUM = ADS_ACEFLAG_ENUM(8i32); pub const ADS_ACEFLAG_INHERITED_ACE: ADS_ACEFLAG_ENUM = ADS_ACEFLAG_ENUM(16i32); pub const ADS_ACEFLAG_VALID_INHERIT_FLAGS: ADS_ACEFLAG_ENUM = ADS_ACEFLAG_ENUM(31i32); pub const ADS_ACEFLAG_SUCCESSFUL_ACCESS: ADS_ACEFLAG_ENUM = ADS_ACEFLAG_ENUM(64i32); pub const ADS_ACEFLAG_FAILED_ACCESS: ADS_ACEFLAG_ENUM = ADS_ACEFLAG_ENUM(128i32); impl ::core::convert::From<i32> for ADS_ACEFLAG_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_ACEFLAG_ENUM { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_ACETYPE_ENUM(pub i32); pub const ADS_ACETYPE_ACCESS_ALLOWED: ADS_ACETYPE_ENUM = ADS_ACETYPE_ENUM(0i32); pub const ADS_ACETYPE_ACCESS_DENIED: ADS_ACETYPE_ENUM = ADS_ACETYPE_ENUM(1i32); pub const ADS_ACETYPE_SYSTEM_AUDIT: ADS_ACETYPE_ENUM = ADS_ACETYPE_ENUM(2i32); pub const ADS_ACETYPE_ACCESS_ALLOWED_OBJECT: ADS_ACETYPE_ENUM = ADS_ACETYPE_ENUM(5i32); pub const ADS_ACETYPE_ACCESS_DENIED_OBJECT: ADS_ACETYPE_ENUM = ADS_ACETYPE_ENUM(6i32); pub const ADS_ACETYPE_SYSTEM_AUDIT_OBJECT: ADS_ACETYPE_ENUM = ADS_ACETYPE_ENUM(7i32); pub const ADS_ACETYPE_SYSTEM_ALARM_OBJECT: ADS_ACETYPE_ENUM = ADS_ACETYPE_ENUM(8i32); pub const ADS_ACETYPE_ACCESS_ALLOWED_CALLBACK: ADS_ACETYPE_ENUM = ADS_ACETYPE_ENUM(9i32); pub const ADS_ACETYPE_ACCESS_DENIED_CALLBACK: ADS_ACETYPE_ENUM = ADS_ACETYPE_ENUM(10i32); pub const ADS_ACETYPE_ACCESS_ALLOWED_CALLBACK_OBJECT: ADS_ACETYPE_ENUM = ADS_ACETYPE_ENUM(11i32); pub const ADS_ACETYPE_ACCESS_DENIED_CALLBACK_OBJECT: ADS_ACETYPE_ENUM = ADS_ACETYPE_ENUM(12i32); pub const ADS_ACETYPE_SYSTEM_AUDIT_CALLBACK: ADS_ACETYPE_ENUM = ADS_ACETYPE_ENUM(13i32); pub const ADS_ACETYPE_SYSTEM_ALARM_CALLBACK: ADS_ACETYPE_ENUM = ADS_ACETYPE_ENUM(14i32); pub const ADS_ACETYPE_SYSTEM_AUDIT_CALLBACK_OBJECT: ADS_ACETYPE_ENUM = ADS_ACETYPE_ENUM(15i32); pub const ADS_ACETYPE_SYSTEM_ALARM_CALLBACK_OBJECT: ADS_ACETYPE_ENUM = ADS_ACETYPE_ENUM(16i32); impl ::core::convert::From<i32> for ADS_ACETYPE_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_ACETYPE_ENUM { type Abi = Self; } pub const ADS_ATTR_APPEND: u32 = 3u32; pub const ADS_ATTR_CLEAR: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADS_ATTR_DEF { pub pszAttrName: super::super::Foundation::PWSTR, pub dwADsType: ADSTYPEENUM, pub dwMinRange: u32, pub dwMaxRange: u32, pub fMultiValued: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl ADS_ATTR_DEF {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADS_ATTR_DEF { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADS_ATTR_DEF { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_ATTR_DEF").field("pszAttrName", &self.pszAttrName).field("dwADsType", &self.dwADsType).field("dwMinRange", &self.dwMinRange).field("dwMaxRange", &self.dwMaxRange).field("fMultiValued", &self.fMultiValued).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADS_ATTR_DEF { fn eq(&self, other: &Self) -> bool { self.pszAttrName == other.pszAttrName && self.dwADsType == other.dwADsType && self.dwMinRange == other.dwMinRange && self.dwMaxRange == other.dwMaxRange && self.fMultiValued == other.fMultiValued } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADS_ATTR_DEF {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADS_ATTR_DEF { type Abi = Self; } pub const ADS_ATTR_DELETE: u32 = 4u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADS_ATTR_INFO { pub pszAttrName: super::super::Foundation::PWSTR, pub dwControlCode: u32, pub dwADsType: ADSTYPEENUM, pub pADsValues: *mut ADSVALUE, pub dwNumValues: u32, } #[cfg(feature = "Win32_Foundation")] impl ADS_ATTR_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADS_ATTR_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADS_ATTR_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_ATTR_INFO").field("pszAttrName", &self.pszAttrName).field("dwControlCode", &self.dwControlCode).field("dwADsType", &self.dwADsType).field("pADsValues", &self.pADsValues).field("dwNumValues", &self.dwNumValues).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADS_ATTR_INFO { fn eq(&self, other: &Self) -> bool { self.pszAttrName == other.pszAttrName && self.dwControlCode == other.dwControlCode && self.dwADsType == other.dwADsType && self.pADsValues == other.pADsValues && self.dwNumValues == other.dwNumValues } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADS_ATTR_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADS_ATTR_INFO { type Abi = Self; } pub const ADS_ATTR_UPDATE: u32 = 2u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_AUTHENTICATION_ENUM(pub u32); pub const ADS_SECURE_AUTHENTICATION: ADS_AUTHENTICATION_ENUM = ADS_AUTHENTICATION_ENUM(1u32); pub const ADS_USE_ENCRYPTION: ADS_AUTHENTICATION_ENUM = ADS_AUTHENTICATION_ENUM(2u32); pub const ADS_USE_SSL: ADS_AUTHENTICATION_ENUM = ADS_AUTHENTICATION_ENUM(2u32); pub const ADS_READONLY_SERVER: ADS_AUTHENTICATION_ENUM = ADS_AUTHENTICATION_ENUM(4u32); pub const ADS_PROMPT_CREDENTIALS: ADS_AUTHENTICATION_ENUM = ADS_AUTHENTICATION_ENUM(8u32); pub const ADS_NO_AUTHENTICATION: ADS_AUTHENTICATION_ENUM = ADS_AUTHENTICATION_ENUM(16u32); pub const ADS_FAST_BIND: ADS_AUTHENTICATION_ENUM = ADS_AUTHENTICATION_ENUM(32u32); pub const ADS_USE_SIGNING: ADS_AUTHENTICATION_ENUM = ADS_AUTHENTICATION_ENUM(64u32); pub const ADS_USE_SEALING: ADS_AUTHENTICATION_ENUM = ADS_AUTHENTICATION_ENUM(128u32); pub const ADS_USE_DELEGATION: ADS_AUTHENTICATION_ENUM = ADS_AUTHENTICATION_ENUM(256u32); pub const ADS_SERVER_BIND: ADS_AUTHENTICATION_ENUM = ADS_AUTHENTICATION_ENUM(512u32); pub const ADS_NO_REFERRAL_CHASING: ADS_AUTHENTICATION_ENUM = ADS_AUTHENTICATION_ENUM(1024u32); pub const ADS_AUTH_RESERVED: ADS_AUTHENTICATION_ENUM = ADS_AUTHENTICATION_ENUM(2147483648u32); impl ::core::convert::From<u32> for ADS_AUTHENTICATION_ENUM { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_AUTHENTICATION_ENUM { type Abi = Self; } impl ::core::ops::BitOr for ADS_AUTHENTICATION_ENUM { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for ADS_AUTHENTICATION_ENUM { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for ADS_AUTHENTICATION_ENUM { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for ADS_AUTHENTICATION_ENUM { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for ADS_AUTHENTICATION_ENUM { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADS_BACKLINK { pub RemoteID: u32, pub ObjectName: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ADS_BACKLINK {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADS_BACKLINK { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADS_BACKLINK { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_BACKLINK").field("RemoteID", &self.RemoteID).field("ObjectName", &self.ObjectName).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADS_BACKLINK { fn eq(&self, other: &Self) -> bool { self.RemoteID == other.RemoteID && self.ObjectName == other.ObjectName } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADS_BACKLINK {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADS_BACKLINK { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADS_CASEIGNORE_LIST { pub Next: *mut ADS_CASEIGNORE_LIST, pub String: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ADS_CASEIGNORE_LIST {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADS_CASEIGNORE_LIST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADS_CASEIGNORE_LIST { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_CASEIGNORE_LIST").field("Next", &self.Next).field("String", &self.String).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADS_CASEIGNORE_LIST { fn eq(&self, other: &Self) -> bool { self.Next == other.Next && self.String == other.String } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADS_CASEIGNORE_LIST {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADS_CASEIGNORE_LIST { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_CHASE_REFERRALS_ENUM(pub i32); pub const ADS_CHASE_REFERRALS_NEVER: ADS_CHASE_REFERRALS_ENUM = ADS_CHASE_REFERRALS_ENUM(0i32); pub const ADS_CHASE_REFERRALS_SUBORDINATE: ADS_CHASE_REFERRALS_ENUM = ADS_CHASE_REFERRALS_ENUM(32i32); pub const ADS_CHASE_REFERRALS_EXTERNAL: ADS_CHASE_REFERRALS_ENUM = ADS_CHASE_REFERRALS_ENUM(64i32); pub const ADS_CHASE_REFERRALS_ALWAYS: ADS_CHASE_REFERRALS_ENUM = ADS_CHASE_REFERRALS_ENUM(96i32); impl ::core::convert::From<i32> for ADS_CHASE_REFERRALS_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_CHASE_REFERRALS_ENUM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADS_CLASS_DEF { pub pszClassName: super::super::Foundation::PWSTR, pub dwMandatoryAttrs: u32, pub ppszMandatoryAttrs: *mut super::super::Foundation::PWSTR, pub optionalAttrs: u32, pub ppszOptionalAttrs: *mut *mut super::super::Foundation::PWSTR, pub dwNamingAttrs: u32, pub ppszNamingAttrs: *mut *mut super::super::Foundation::PWSTR, pub dwSuperClasses: u32, pub ppszSuperClasses: *mut *mut super::super::Foundation::PWSTR, pub fIsContainer: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl ADS_CLASS_DEF {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADS_CLASS_DEF { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADS_CLASS_DEF { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_CLASS_DEF") .field("pszClassName", &self.pszClassName) .field("dwMandatoryAttrs", &self.dwMandatoryAttrs) .field("ppszMandatoryAttrs", &self.ppszMandatoryAttrs) .field("optionalAttrs", &self.optionalAttrs) .field("ppszOptionalAttrs", &self.ppszOptionalAttrs) .field("dwNamingAttrs", &self.dwNamingAttrs) .field("ppszNamingAttrs", &self.ppszNamingAttrs) .field("dwSuperClasses", &self.dwSuperClasses) .field("ppszSuperClasses", &self.ppszSuperClasses) .field("fIsContainer", &self.fIsContainer) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADS_CLASS_DEF { fn eq(&self, other: &Self) -> bool { self.pszClassName == other.pszClassName && self.dwMandatoryAttrs == other.dwMandatoryAttrs && self.ppszMandatoryAttrs == other.ppszMandatoryAttrs && self.optionalAttrs == other.optionalAttrs && self.ppszOptionalAttrs == other.ppszOptionalAttrs && self.dwNamingAttrs == other.dwNamingAttrs && self.ppszNamingAttrs == other.ppszNamingAttrs && self.dwSuperClasses == other.dwSuperClasses && self.ppszSuperClasses == other.ppszSuperClasses && self.fIsContainer == other.fIsContainer } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADS_CLASS_DEF {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADS_CLASS_DEF { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_DEREFENUM(pub i32); pub const ADS_DEREF_NEVER: ADS_DEREFENUM = ADS_DEREFENUM(0i32); pub const ADS_DEREF_SEARCHING: ADS_DEREFENUM = ADS_DEREFENUM(1i32); pub const ADS_DEREF_FINDING: ADS_DEREFENUM = ADS_DEREFENUM(2i32); pub const ADS_DEREF_ALWAYS: ADS_DEREFENUM = ADS_DEREFENUM(3i32); impl ::core::convert::From<i32> for ADS_DEREFENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_DEREFENUM { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_DISPLAY_ENUM(pub i32); pub const ADS_DISPLAY_FULL: ADS_DISPLAY_ENUM = ADS_DISPLAY_ENUM(1i32); pub const ADS_DISPLAY_VALUE_ONLY: ADS_DISPLAY_ENUM = ADS_DISPLAY_ENUM(2i32); impl ::core::convert::From<i32> for ADS_DISPLAY_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_DISPLAY_ENUM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADS_DN_WITH_BINARY { pub dwLength: u32, pub lpBinaryValue: *mut u8, pub pszDNString: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ADS_DN_WITH_BINARY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADS_DN_WITH_BINARY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADS_DN_WITH_BINARY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_DN_WITH_BINARY").field("dwLength", &self.dwLength).field("lpBinaryValue", &self.lpBinaryValue).field("pszDNString", &self.pszDNString).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADS_DN_WITH_BINARY { fn eq(&self, other: &Self) -> bool { self.dwLength == other.dwLength && self.lpBinaryValue == other.lpBinaryValue && self.pszDNString == other.pszDNString } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADS_DN_WITH_BINARY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADS_DN_WITH_BINARY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADS_DN_WITH_STRING { pub pszStringValue: super::super::Foundation::PWSTR, pub pszDNString: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ADS_DN_WITH_STRING {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADS_DN_WITH_STRING { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADS_DN_WITH_STRING { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_DN_WITH_STRING").field("pszStringValue", &self.pszStringValue).field("pszDNString", &self.pszDNString).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADS_DN_WITH_STRING { fn eq(&self, other: &Self) -> bool { self.pszStringValue == other.pszStringValue && self.pszDNString == other.pszDNString } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADS_DN_WITH_STRING {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADS_DN_WITH_STRING { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADS_EMAIL { pub Address: super::super::Foundation::PWSTR, pub Type: u32, } #[cfg(feature = "Win32_Foundation")] impl ADS_EMAIL {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADS_EMAIL { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADS_EMAIL { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_EMAIL").field("Address", &self.Address).field("Type", &self.Type).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADS_EMAIL { fn eq(&self, other: &Self) -> bool { self.Address == other.Address && self.Type == other.Type } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADS_EMAIL {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADS_EMAIL { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_ESCAPE_MODE_ENUM(pub i32); pub const ADS_ESCAPEDMODE_DEFAULT: ADS_ESCAPE_MODE_ENUM = ADS_ESCAPE_MODE_ENUM(1i32); pub const ADS_ESCAPEDMODE_ON: ADS_ESCAPE_MODE_ENUM = ADS_ESCAPE_MODE_ENUM(2i32); pub const ADS_ESCAPEDMODE_OFF: ADS_ESCAPE_MODE_ENUM = ADS_ESCAPE_MODE_ENUM(3i32); pub const ADS_ESCAPEDMODE_OFF_EX: ADS_ESCAPE_MODE_ENUM = ADS_ESCAPE_MODE_ENUM(4i32); impl ::core::convert::From<i32> for ADS_ESCAPE_MODE_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_ESCAPE_MODE_ENUM { type Abi = Self; } pub const ADS_EXT_INITCREDENTIALS: u32 = 1u32; pub const ADS_EXT_INITIALIZE_COMPLETE: u32 = 2u32; pub const ADS_EXT_MAXEXTDISPID: u32 = 16777215u32; pub const ADS_EXT_MINEXTDISPID: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADS_FAXNUMBER { pub TelephoneNumber: super::super::Foundation::PWSTR, pub NumberOfBits: u32, pub Parameters: *mut u8, } #[cfg(feature = "Win32_Foundation")] impl ADS_FAXNUMBER {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADS_FAXNUMBER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADS_FAXNUMBER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_FAXNUMBER").field("TelephoneNumber", &self.TelephoneNumber).field("NumberOfBits", &self.NumberOfBits).field("Parameters", &self.Parameters).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADS_FAXNUMBER { fn eq(&self, other: &Self) -> bool { self.TelephoneNumber == other.TelephoneNumber && self.NumberOfBits == other.NumberOfBits && self.Parameters == other.Parameters } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADS_FAXNUMBER {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADS_FAXNUMBER { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_FLAGTYPE_ENUM(pub i32); pub const ADS_FLAG_OBJECT_TYPE_PRESENT: ADS_FLAGTYPE_ENUM = ADS_FLAGTYPE_ENUM(1i32); pub const ADS_FLAG_INHERITED_OBJECT_TYPE_PRESENT: ADS_FLAGTYPE_ENUM = ADS_FLAGTYPE_ENUM(2i32); impl ::core::convert::From<i32> for ADS_FLAGTYPE_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_FLAGTYPE_ENUM { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_FORMAT_ENUM(pub i32); pub const ADS_FORMAT_WINDOWS: ADS_FORMAT_ENUM = ADS_FORMAT_ENUM(1i32); pub const ADS_FORMAT_WINDOWS_NO_SERVER: ADS_FORMAT_ENUM = ADS_FORMAT_ENUM(2i32); pub const ADS_FORMAT_WINDOWS_DN: ADS_FORMAT_ENUM = ADS_FORMAT_ENUM(3i32); pub const ADS_FORMAT_WINDOWS_PARENT: ADS_FORMAT_ENUM = ADS_FORMAT_ENUM(4i32); pub const ADS_FORMAT_X500: ADS_FORMAT_ENUM = ADS_FORMAT_ENUM(5i32); pub const ADS_FORMAT_X500_NO_SERVER: ADS_FORMAT_ENUM = ADS_FORMAT_ENUM(6i32); pub const ADS_FORMAT_X500_DN: ADS_FORMAT_ENUM = ADS_FORMAT_ENUM(7i32); pub const ADS_FORMAT_X500_PARENT: ADS_FORMAT_ENUM = ADS_FORMAT_ENUM(8i32); pub const ADS_FORMAT_SERVER: ADS_FORMAT_ENUM = ADS_FORMAT_ENUM(9i32); pub const ADS_FORMAT_PROVIDER: ADS_FORMAT_ENUM = ADS_FORMAT_ENUM(10i32); pub const ADS_FORMAT_LEAF: ADS_FORMAT_ENUM = ADS_FORMAT_ENUM(11i32); impl ::core::convert::From<i32> for ADS_FORMAT_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_FORMAT_ENUM { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_GROUP_TYPE_ENUM(pub i32); pub const ADS_GROUP_TYPE_GLOBAL_GROUP: ADS_GROUP_TYPE_ENUM = ADS_GROUP_TYPE_ENUM(2i32); pub const ADS_GROUP_TYPE_DOMAIN_LOCAL_GROUP: ADS_GROUP_TYPE_ENUM = ADS_GROUP_TYPE_ENUM(4i32); pub const ADS_GROUP_TYPE_LOCAL_GROUP: ADS_GROUP_TYPE_ENUM = ADS_GROUP_TYPE_ENUM(4i32); pub const ADS_GROUP_TYPE_UNIVERSAL_GROUP: ADS_GROUP_TYPE_ENUM = ADS_GROUP_TYPE_ENUM(8i32); pub const ADS_GROUP_TYPE_SECURITY_ENABLED: ADS_GROUP_TYPE_ENUM = ADS_GROUP_TYPE_ENUM(-2147483648i32); impl ::core::convert::From<i32> for ADS_GROUP_TYPE_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_GROUP_TYPE_ENUM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADS_HOLD { pub ObjectName: super::super::Foundation::PWSTR, pub Amount: u32, } #[cfg(feature = "Win32_Foundation")] impl ADS_HOLD {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADS_HOLD { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADS_HOLD { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_HOLD").field("ObjectName", &self.ObjectName).field("Amount", &self.Amount).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADS_HOLD { fn eq(&self, other: &Self) -> bool { self.ObjectName == other.ObjectName && self.Amount == other.Amount } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADS_HOLD {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADS_HOLD { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_NAME_INITTYPE_ENUM(pub i32); pub const ADS_NAME_INITTYPE_DOMAIN: ADS_NAME_INITTYPE_ENUM = ADS_NAME_INITTYPE_ENUM(1i32); pub const ADS_NAME_INITTYPE_SERVER: ADS_NAME_INITTYPE_ENUM = ADS_NAME_INITTYPE_ENUM(2i32); pub const ADS_NAME_INITTYPE_GC: ADS_NAME_INITTYPE_ENUM = ADS_NAME_INITTYPE_ENUM(3i32); impl ::core::convert::From<i32> for ADS_NAME_INITTYPE_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_NAME_INITTYPE_ENUM { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_NAME_TYPE_ENUM(pub i32); pub const ADS_NAME_TYPE_1779: ADS_NAME_TYPE_ENUM = ADS_NAME_TYPE_ENUM(1i32); pub const ADS_NAME_TYPE_CANONICAL: ADS_NAME_TYPE_ENUM = ADS_NAME_TYPE_ENUM(2i32); pub const ADS_NAME_TYPE_NT4: ADS_NAME_TYPE_ENUM = ADS_NAME_TYPE_ENUM(3i32); pub const ADS_NAME_TYPE_DISPLAY: ADS_NAME_TYPE_ENUM = ADS_NAME_TYPE_ENUM(4i32); pub const ADS_NAME_TYPE_DOMAIN_SIMPLE: ADS_NAME_TYPE_ENUM = ADS_NAME_TYPE_ENUM(5i32); pub const ADS_NAME_TYPE_ENTERPRISE_SIMPLE: ADS_NAME_TYPE_ENUM = ADS_NAME_TYPE_ENUM(6i32); pub const ADS_NAME_TYPE_GUID: ADS_NAME_TYPE_ENUM = ADS_NAME_TYPE_ENUM(7i32); pub const ADS_NAME_TYPE_UNKNOWN: ADS_NAME_TYPE_ENUM = ADS_NAME_TYPE_ENUM(8i32); pub const ADS_NAME_TYPE_USER_PRINCIPAL_NAME: ADS_NAME_TYPE_ENUM = ADS_NAME_TYPE_ENUM(9i32); pub const ADS_NAME_TYPE_CANONICAL_EX: ADS_NAME_TYPE_ENUM = ADS_NAME_TYPE_ENUM(10i32); pub const ADS_NAME_TYPE_SERVICE_PRINCIPAL_NAME: ADS_NAME_TYPE_ENUM = ADS_NAME_TYPE_ENUM(11i32); pub const ADS_NAME_TYPE_SID_OR_SID_HISTORY_NAME: ADS_NAME_TYPE_ENUM = ADS_NAME_TYPE_ENUM(12i32); impl ::core::convert::From<i32> for ADS_NAME_TYPE_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_NAME_TYPE_ENUM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct ADS_NETADDRESS { pub AddressType: u32, pub AddressLength: u32, pub Address: *mut u8, } impl ADS_NETADDRESS {} impl ::core::default::Default for ADS_NETADDRESS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for ADS_NETADDRESS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_NETADDRESS").field("AddressType", &self.AddressType).field("AddressLength", &self.AddressLength).field("Address", &self.Address).finish() } } impl ::core::cmp::PartialEq for ADS_NETADDRESS { fn eq(&self, other: &Self) -> bool { self.AddressType == other.AddressType && self.AddressLength == other.AddressLength && self.Address == other.Address } } impl ::core::cmp::Eq for ADS_NETADDRESS {} unsafe impl ::windows::core::Abi for ADS_NETADDRESS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct ADS_NT_SECURITY_DESCRIPTOR { pub dwLength: u32, pub lpValue: *mut u8, } impl ADS_NT_SECURITY_DESCRIPTOR {} impl ::core::default::Default for ADS_NT_SECURITY_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for ADS_NT_SECURITY_DESCRIPTOR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_NT_SECURITY_DESCRIPTOR").field("dwLength", &self.dwLength).field("lpValue", &self.lpValue).finish() } } impl ::core::cmp::PartialEq for ADS_NT_SECURITY_DESCRIPTOR { fn eq(&self, other: &Self) -> bool { self.dwLength == other.dwLength && self.lpValue == other.lpValue } } impl ::core::cmp::Eq for ADS_NT_SECURITY_DESCRIPTOR {} unsafe impl ::windows::core::Abi for ADS_NT_SECURITY_DESCRIPTOR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADS_OBJECT_INFO { pub pszRDN: super::super::Foundation::PWSTR, pub pszObjectDN: super::super::Foundation::PWSTR, pub pszParentDN: super::super::Foundation::PWSTR, pub pszSchemaDN: super::super::Foundation::PWSTR, pub pszClassName: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ADS_OBJECT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADS_OBJECT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADS_OBJECT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_OBJECT_INFO").field("pszRDN", &self.pszRDN).field("pszObjectDN", &self.pszObjectDN).field("pszParentDN", &self.pszParentDN).field("pszSchemaDN", &self.pszSchemaDN).field("pszClassName", &self.pszClassName).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADS_OBJECT_INFO { fn eq(&self, other: &Self) -> bool { self.pszRDN == other.pszRDN && self.pszObjectDN == other.pszObjectDN && self.pszParentDN == other.pszParentDN && self.pszSchemaDN == other.pszSchemaDN && self.pszClassName == other.pszClassName } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADS_OBJECT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADS_OBJECT_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct ADS_OCTET_LIST { pub Next: *mut ADS_OCTET_LIST, pub Length: u32, pub Data: *mut u8, } impl ADS_OCTET_LIST {} impl ::core::default::Default for ADS_OCTET_LIST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for ADS_OCTET_LIST { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_OCTET_LIST").field("Next", &self.Next).field("Length", &self.Length).field("Data", &self.Data).finish() } } impl ::core::cmp::PartialEq for ADS_OCTET_LIST { fn eq(&self, other: &Self) -> bool { self.Next == other.Next && self.Length == other.Length && self.Data == other.Data } } impl ::core::cmp::Eq for ADS_OCTET_LIST {} unsafe impl ::windows::core::Abi for ADS_OCTET_LIST { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct ADS_OCTET_STRING { pub dwLength: u32, pub lpValue: *mut u8, } impl ADS_OCTET_STRING {} impl ::core::default::Default for ADS_OCTET_STRING { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for ADS_OCTET_STRING { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_OCTET_STRING").field("dwLength", &self.dwLength).field("lpValue", &self.lpValue).finish() } } impl ::core::cmp::PartialEq for ADS_OCTET_STRING { fn eq(&self, other: &Self) -> bool { self.dwLength == other.dwLength && self.lpValue == other.lpValue } } impl ::core::cmp::Eq for ADS_OCTET_STRING {} unsafe impl ::windows::core::Abi for ADS_OCTET_STRING { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_OPTION_ENUM(pub i32); pub const ADS_OPTION_SERVERNAME: ADS_OPTION_ENUM = ADS_OPTION_ENUM(0i32); pub const ADS_OPTION_REFERRALS: ADS_OPTION_ENUM = ADS_OPTION_ENUM(1i32); pub const ADS_OPTION_PAGE_SIZE: ADS_OPTION_ENUM = ADS_OPTION_ENUM(2i32); pub const ADS_OPTION_SECURITY_MASK: ADS_OPTION_ENUM = ADS_OPTION_ENUM(3i32); pub const ADS_OPTION_MUTUAL_AUTH_STATUS: ADS_OPTION_ENUM = ADS_OPTION_ENUM(4i32); pub const ADS_OPTION_QUOTA: ADS_OPTION_ENUM = ADS_OPTION_ENUM(5i32); pub const ADS_OPTION_PASSWORD_PORTNUMBER: ADS_OPTION_ENUM = ADS_OPTION_ENUM(6i32); pub const ADS_OPTION_PASSWORD_METHOD: ADS_OPTION_ENUM = ADS_OPTION_ENUM(7i32); pub const ADS_OPTION_ACCUMULATIVE_MODIFICATION: ADS_OPTION_ENUM = ADS_OPTION_ENUM(8i32); pub const ADS_OPTION_SKIP_SID_LOOKUP: ADS_OPTION_ENUM = ADS_OPTION_ENUM(9i32); impl ::core::convert::From<i32> for ADS_OPTION_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_OPTION_ENUM { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_PASSWORD_ENCODING_ENUM(pub i32); pub const ADS_PASSWORD_ENCODE_REQUIRE_SSL: ADS_PASSWORD_ENCODING_ENUM = ADS_PASSWORD_ENCODING_ENUM(0i32); pub const ADS_PASSWORD_ENCODE_CLEAR: ADS_PASSWORD_ENCODING_ENUM = ADS_PASSWORD_ENCODING_ENUM(1i32); impl ::core::convert::From<i32> for ADS_PASSWORD_ENCODING_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_PASSWORD_ENCODING_ENUM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADS_PATH { pub Type: u32, pub VolumeName: super::super::Foundation::PWSTR, pub Path: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ADS_PATH {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADS_PATH { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADS_PATH { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_PATH").field("Type", &self.Type).field("VolumeName", &self.VolumeName).field("Path", &self.Path).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADS_PATH { fn eq(&self, other: &Self) -> bool { self.Type == other.Type && self.VolumeName == other.VolumeName && self.Path == other.Path } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADS_PATH {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADS_PATH { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_PATHTYPE_ENUM(pub i32); pub const ADS_PATH_FILE: ADS_PATHTYPE_ENUM = ADS_PATHTYPE_ENUM(1i32); pub const ADS_PATH_FILESHARE: ADS_PATHTYPE_ENUM = ADS_PATHTYPE_ENUM(2i32); pub const ADS_PATH_REGISTRY: ADS_PATHTYPE_ENUM = ADS_PATHTYPE_ENUM(3i32); impl ::core::convert::From<i32> for ADS_PATHTYPE_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_PATHTYPE_ENUM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADS_POSTALADDRESS { pub PostalAddress: [super::super::Foundation::PWSTR; 6], } #[cfg(feature = "Win32_Foundation")] impl ADS_POSTALADDRESS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADS_POSTALADDRESS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADS_POSTALADDRESS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_POSTALADDRESS").field("PostalAddress", &self.PostalAddress).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADS_POSTALADDRESS { fn eq(&self, other: &Self) -> bool { self.PostalAddress == other.PostalAddress } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADS_POSTALADDRESS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADS_POSTALADDRESS { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_PREFERENCES_ENUM(pub i32); pub const ADSIPROP_ASYNCHRONOUS: ADS_PREFERENCES_ENUM = ADS_PREFERENCES_ENUM(0i32); pub const ADSIPROP_DEREF_ALIASES: ADS_PREFERENCES_ENUM = ADS_PREFERENCES_ENUM(1i32); pub const ADSIPROP_SIZE_LIMIT: ADS_PREFERENCES_ENUM = ADS_PREFERENCES_ENUM(2i32); pub const ADSIPROP_TIME_LIMIT: ADS_PREFERENCES_ENUM = ADS_PREFERENCES_ENUM(3i32); pub const ADSIPROP_ATTRIBTYPES_ONLY: ADS_PREFERENCES_ENUM = ADS_PREFERENCES_ENUM(4i32); pub const ADSIPROP_SEARCH_SCOPE: ADS_PREFERENCES_ENUM = ADS_PREFERENCES_ENUM(5i32); pub const ADSIPROP_TIMEOUT: ADS_PREFERENCES_ENUM = ADS_PREFERENCES_ENUM(6i32); pub const ADSIPROP_PAGESIZE: ADS_PREFERENCES_ENUM = ADS_PREFERENCES_ENUM(7i32); pub const ADSIPROP_PAGED_TIME_LIMIT: ADS_PREFERENCES_ENUM = ADS_PREFERENCES_ENUM(8i32); pub const ADSIPROP_CHASE_REFERRALS: ADS_PREFERENCES_ENUM = ADS_PREFERENCES_ENUM(9i32); pub const ADSIPROP_SORT_ON: ADS_PREFERENCES_ENUM = ADS_PREFERENCES_ENUM(10i32); pub const ADSIPROP_CACHE_RESULTS: ADS_PREFERENCES_ENUM = ADS_PREFERENCES_ENUM(11i32); pub const ADSIPROP_ADSIFLAG: ADS_PREFERENCES_ENUM = ADS_PREFERENCES_ENUM(12i32); impl ::core::convert::From<i32> for ADS_PREFERENCES_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_PREFERENCES_ENUM { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_PROPERTY_OPERATION_ENUM(pub i32); pub const ADS_PROPERTY_CLEAR: ADS_PROPERTY_OPERATION_ENUM = ADS_PROPERTY_OPERATION_ENUM(1i32); pub const ADS_PROPERTY_UPDATE: ADS_PROPERTY_OPERATION_ENUM = ADS_PROPERTY_OPERATION_ENUM(2i32); pub const ADS_PROPERTY_APPEND: ADS_PROPERTY_OPERATION_ENUM = ADS_PROPERTY_OPERATION_ENUM(3i32); pub const ADS_PROPERTY_DELETE: ADS_PROPERTY_OPERATION_ENUM = ADS_PROPERTY_OPERATION_ENUM(4i32); impl ::core::convert::From<i32> for ADS_PROPERTY_OPERATION_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_PROPERTY_OPERATION_ENUM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct ADS_PROV_SPECIFIC { pub dwLength: u32, pub lpValue: *mut u8, } impl ADS_PROV_SPECIFIC {} impl ::core::default::Default for ADS_PROV_SPECIFIC { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for ADS_PROV_SPECIFIC { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_PROV_SPECIFIC").field("dwLength", &self.dwLength).field("lpValue", &self.lpValue).finish() } } impl ::core::cmp::PartialEq for ADS_PROV_SPECIFIC { fn eq(&self, other: &Self) -> bool { self.dwLength == other.dwLength && self.lpValue == other.lpValue } } impl ::core::cmp::Eq for ADS_PROV_SPECIFIC {} unsafe impl ::windows::core::Abi for ADS_PROV_SPECIFIC { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADS_REPLICAPOINTER { pub ServerName: super::super::Foundation::PWSTR, pub ReplicaType: u32, pub ReplicaNumber: u32, pub Count: u32, pub ReplicaAddressHints: *mut ADS_NETADDRESS, } #[cfg(feature = "Win32_Foundation")] impl ADS_REPLICAPOINTER {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADS_REPLICAPOINTER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADS_REPLICAPOINTER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_REPLICAPOINTER").field("ServerName", &self.ServerName).field("ReplicaType", &self.ReplicaType).field("ReplicaNumber", &self.ReplicaNumber).field("Count", &self.Count).field("ReplicaAddressHints", &self.ReplicaAddressHints).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADS_REPLICAPOINTER { fn eq(&self, other: &Self) -> bool { self.ServerName == other.ServerName && self.ReplicaType == other.ReplicaType && self.ReplicaNumber == other.ReplicaNumber && self.Count == other.Count && self.ReplicaAddressHints == other.ReplicaAddressHints } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADS_REPLICAPOINTER {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADS_REPLICAPOINTER { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_RIGHTS_ENUM(pub i32); pub const ADS_RIGHT_DELETE: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(65536i32); pub const ADS_RIGHT_READ_CONTROL: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(131072i32); pub const ADS_RIGHT_WRITE_DAC: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(262144i32); pub const ADS_RIGHT_WRITE_OWNER: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(524288i32); pub const ADS_RIGHT_SYNCHRONIZE: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(1048576i32); pub const ADS_RIGHT_ACCESS_SYSTEM_SECURITY: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(16777216i32); pub const ADS_RIGHT_GENERIC_READ: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(-2147483648i32); pub const ADS_RIGHT_GENERIC_WRITE: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(1073741824i32); pub const ADS_RIGHT_GENERIC_EXECUTE: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(536870912i32); pub const ADS_RIGHT_GENERIC_ALL: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(268435456i32); pub const ADS_RIGHT_DS_CREATE_CHILD: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(1i32); pub const ADS_RIGHT_DS_DELETE_CHILD: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(2i32); pub const ADS_RIGHT_ACTRL_DS_LIST: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(4i32); pub const ADS_RIGHT_DS_SELF: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(8i32); pub const ADS_RIGHT_DS_READ_PROP: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(16i32); pub const ADS_RIGHT_DS_WRITE_PROP: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(32i32); pub const ADS_RIGHT_DS_DELETE_TREE: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(64i32); pub const ADS_RIGHT_DS_LIST_OBJECT: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(128i32); pub const ADS_RIGHT_DS_CONTROL_ACCESS: ADS_RIGHTS_ENUM = ADS_RIGHTS_ENUM(256i32); impl ::core::convert::From<i32> for ADS_RIGHTS_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_RIGHTS_ENUM { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_SCOPEENUM(pub i32); pub const ADS_SCOPE_BASE: ADS_SCOPEENUM = ADS_SCOPEENUM(0i32); pub const ADS_SCOPE_ONELEVEL: ADS_SCOPEENUM = ADS_SCOPEENUM(1i32); pub const ADS_SCOPE_SUBTREE: ADS_SCOPEENUM = ADS_SCOPEENUM(2i32); impl ::core::convert::From<i32> for ADS_SCOPEENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_SCOPEENUM { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_SD_CONTROL_ENUM(pub i32); pub const ADS_SD_CONTROL_SE_OWNER_DEFAULTED: ADS_SD_CONTROL_ENUM = ADS_SD_CONTROL_ENUM(1i32); pub const ADS_SD_CONTROL_SE_GROUP_DEFAULTED: ADS_SD_CONTROL_ENUM = ADS_SD_CONTROL_ENUM(2i32); pub const ADS_SD_CONTROL_SE_DACL_PRESENT: ADS_SD_CONTROL_ENUM = ADS_SD_CONTROL_ENUM(4i32); pub const ADS_SD_CONTROL_SE_DACL_DEFAULTED: ADS_SD_CONTROL_ENUM = ADS_SD_CONTROL_ENUM(8i32); pub const ADS_SD_CONTROL_SE_SACL_PRESENT: ADS_SD_CONTROL_ENUM = ADS_SD_CONTROL_ENUM(16i32); pub const ADS_SD_CONTROL_SE_SACL_DEFAULTED: ADS_SD_CONTROL_ENUM = ADS_SD_CONTROL_ENUM(32i32); pub const ADS_SD_CONTROL_SE_DACL_AUTO_INHERIT_REQ: ADS_SD_CONTROL_ENUM = ADS_SD_CONTROL_ENUM(256i32); pub const ADS_SD_CONTROL_SE_SACL_AUTO_INHERIT_REQ: ADS_SD_CONTROL_ENUM = ADS_SD_CONTROL_ENUM(512i32); pub const ADS_SD_CONTROL_SE_DACL_AUTO_INHERITED: ADS_SD_CONTROL_ENUM = ADS_SD_CONTROL_ENUM(1024i32); pub const ADS_SD_CONTROL_SE_SACL_AUTO_INHERITED: ADS_SD_CONTROL_ENUM = ADS_SD_CONTROL_ENUM(2048i32); pub const ADS_SD_CONTROL_SE_DACL_PROTECTED: ADS_SD_CONTROL_ENUM = ADS_SD_CONTROL_ENUM(4096i32); pub const ADS_SD_CONTROL_SE_SACL_PROTECTED: ADS_SD_CONTROL_ENUM = ADS_SD_CONTROL_ENUM(8192i32); pub const ADS_SD_CONTROL_SE_SELF_RELATIVE: ADS_SD_CONTROL_ENUM = ADS_SD_CONTROL_ENUM(32768i32); impl ::core::convert::From<i32> for ADS_SD_CONTROL_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_SD_CONTROL_ENUM { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_SD_FORMAT_ENUM(pub i32); pub const ADS_SD_FORMAT_IID: ADS_SD_FORMAT_ENUM = ADS_SD_FORMAT_ENUM(1i32); pub const ADS_SD_FORMAT_RAW: ADS_SD_FORMAT_ENUM = ADS_SD_FORMAT_ENUM(2i32); pub const ADS_SD_FORMAT_HEXSTRING: ADS_SD_FORMAT_ENUM = ADS_SD_FORMAT_ENUM(3i32); impl ::core::convert::From<i32> for ADS_SD_FORMAT_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_SD_FORMAT_ENUM { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_SD_REVISION_ENUM(pub i32); pub const ADS_SD_REVISION_DS: ADS_SD_REVISION_ENUM = ADS_SD_REVISION_ENUM(4i32); impl ::core::convert::From<i32> for ADS_SD_REVISION_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_SD_REVISION_ENUM { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_SEARCHPREF_ENUM(pub i32); pub const ADS_SEARCHPREF_ASYNCHRONOUS: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(0i32); pub const ADS_SEARCHPREF_DEREF_ALIASES: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(1i32); pub const ADS_SEARCHPREF_SIZE_LIMIT: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(2i32); pub const ADS_SEARCHPREF_TIME_LIMIT: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(3i32); pub const ADS_SEARCHPREF_ATTRIBTYPES_ONLY: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(4i32); pub const ADS_SEARCHPREF_SEARCH_SCOPE: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(5i32); pub const ADS_SEARCHPREF_TIMEOUT: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(6i32); pub const ADS_SEARCHPREF_PAGESIZE: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(7i32); pub const ADS_SEARCHPREF_PAGED_TIME_LIMIT: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(8i32); pub const ADS_SEARCHPREF_CHASE_REFERRALS: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(9i32); pub const ADS_SEARCHPREF_SORT_ON: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(10i32); pub const ADS_SEARCHPREF_CACHE_RESULTS: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(11i32); pub const ADS_SEARCHPREF_DIRSYNC: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(12i32); pub const ADS_SEARCHPREF_TOMBSTONE: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(13i32); pub const ADS_SEARCHPREF_VLV: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(14i32); pub const ADS_SEARCHPREF_ATTRIBUTE_QUERY: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(15i32); pub const ADS_SEARCHPREF_SECURITY_MASK: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(16i32); pub const ADS_SEARCHPREF_DIRSYNC_FLAG: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(17i32); pub const ADS_SEARCHPREF_EXTENDED_DN: ADS_SEARCHPREF_ENUM = ADS_SEARCHPREF_ENUM(18i32); impl ::core::convert::From<i32> for ADS_SEARCHPREF_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_SEARCHPREF_ENUM { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_SECURITY_INFO_ENUM(pub i32); pub const ADS_SECURITY_INFO_OWNER: ADS_SECURITY_INFO_ENUM = ADS_SECURITY_INFO_ENUM(1i32); pub const ADS_SECURITY_INFO_GROUP: ADS_SECURITY_INFO_ENUM = ADS_SECURITY_INFO_ENUM(2i32); pub const ADS_SECURITY_INFO_DACL: ADS_SECURITY_INFO_ENUM = ADS_SECURITY_INFO_ENUM(4i32); pub const ADS_SECURITY_INFO_SACL: ADS_SECURITY_INFO_ENUM = ADS_SECURITY_INFO_ENUM(8i32); impl ::core::convert::From<i32> for ADS_SECURITY_INFO_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_SECURITY_INFO_ENUM { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_SETTYPE_ENUM(pub i32); pub const ADS_SETTYPE_FULL: ADS_SETTYPE_ENUM = ADS_SETTYPE_ENUM(1i32); pub const ADS_SETTYPE_PROVIDER: ADS_SETTYPE_ENUM = ADS_SETTYPE_ENUM(2i32); pub const ADS_SETTYPE_SERVER: ADS_SETTYPE_ENUM = ADS_SETTYPE_ENUM(3i32); pub const ADS_SETTYPE_DN: ADS_SETTYPE_ENUM = ADS_SETTYPE_ENUM(4i32); impl ::core::convert::From<i32> for ADS_SETTYPE_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_SETTYPE_ENUM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADS_SORTKEY { pub pszAttrType: super::super::Foundation::PWSTR, pub pszReserved: super::super::Foundation::PWSTR, pub fReverseorder: super::super::Foundation::BOOLEAN, } #[cfg(feature = "Win32_Foundation")] impl ADS_SORTKEY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADS_SORTKEY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADS_SORTKEY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_SORTKEY").field("pszAttrType", &self.pszAttrType).field("pszReserved", &self.pszReserved).field("fReverseorder", &self.fReverseorder).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADS_SORTKEY { fn eq(&self, other: &Self) -> bool { self.pszAttrType == other.pszAttrType && self.pszReserved == other.pszReserved && self.fReverseorder == other.fReverseorder } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADS_SORTKEY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADS_SORTKEY { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_STATUSENUM(pub i32); pub const ADS_STATUS_S_OK: ADS_STATUSENUM = ADS_STATUSENUM(0i32); pub const ADS_STATUS_INVALID_SEARCHPREF: ADS_STATUSENUM = ADS_STATUSENUM(1i32); pub const ADS_STATUS_INVALID_SEARCHPREFVALUE: ADS_STATUSENUM = ADS_STATUSENUM(2i32); impl ::core::convert::From<i32> for ADS_STATUSENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_STATUSENUM { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_SYSTEMFLAG_ENUM(pub i32); pub const ADS_SYSTEMFLAG_DISALLOW_DELETE: ADS_SYSTEMFLAG_ENUM = ADS_SYSTEMFLAG_ENUM(-2147483648i32); pub const ADS_SYSTEMFLAG_CONFIG_ALLOW_RENAME: ADS_SYSTEMFLAG_ENUM = ADS_SYSTEMFLAG_ENUM(1073741824i32); pub const ADS_SYSTEMFLAG_CONFIG_ALLOW_MOVE: ADS_SYSTEMFLAG_ENUM = ADS_SYSTEMFLAG_ENUM(536870912i32); pub const ADS_SYSTEMFLAG_CONFIG_ALLOW_LIMITED_MOVE: ADS_SYSTEMFLAG_ENUM = ADS_SYSTEMFLAG_ENUM(268435456i32); pub const ADS_SYSTEMFLAG_DOMAIN_DISALLOW_RENAME: ADS_SYSTEMFLAG_ENUM = ADS_SYSTEMFLAG_ENUM(134217728i32); pub const ADS_SYSTEMFLAG_DOMAIN_DISALLOW_MOVE: ADS_SYSTEMFLAG_ENUM = ADS_SYSTEMFLAG_ENUM(67108864i32); pub const ADS_SYSTEMFLAG_CR_NTDS_NC: ADS_SYSTEMFLAG_ENUM = ADS_SYSTEMFLAG_ENUM(1i32); pub const ADS_SYSTEMFLAG_CR_NTDS_DOMAIN: ADS_SYSTEMFLAG_ENUM = ADS_SYSTEMFLAG_ENUM(2i32); pub const ADS_SYSTEMFLAG_ATTR_NOT_REPLICATED: ADS_SYSTEMFLAG_ENUM = ADS_SYSTEMFLAG_ENUM(1i32); pub const ADS_SYSTEMFLAG_ATTR_IS_CONSTRUCTED: ADS_SYSTEMFLAG_ENUM = ADS_SYSTEMFLAG_ENUM(4i32); impl ::core::convert::From<i32> for ADS_SYSTEMFLAG_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_SYSTEMFLAG_ENUM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct ADS_TIMESTAMP { pub WholeSeconds: u32, pub EventID: u32, } impl ADS_TIMESTAMP {} impl ::core::default::Default for ADS_TIMESTAMP { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for ADS_TIMESTAMP { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_TIMESTAMP").field("WholeSeconds", &self.WholeSeconds).field("EventID", &self.EventID).finish() } } impl ::core::cmp::PartialEq for ADS_TIMESTAMP { fn eq(&self, other: &Self) -> bool { self.WholeSeconds == other.WholeSeconds && self.EventID == other.EventID } } impl ::core::cmp::Eq for ADS_TIMESTAMP {} unsafe impl ::windows::core::Abi for ADS_TIMESTAMP { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADS_TYPEDNAME { pub ObjectName: super::super::Foundation::PWSTR, pub Level: u32, pub Interval: u32, } #[cfg(feature = "Win32_Foundation")] impl ADS_TYPEDNAME {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADS_TYPEDNAME { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADS_TYPEDNAME { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_TYPEDNAME").field("ObjectName", &self.ObjectName).field("Level", &self.Level).field("Interval", &self.Interval).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADS_TYPEDNAME { fn eq(&self, other: &Self) -> bool { self.ObjectName == other.ObjectName && self.Level == other.Level && self.Interval == other.Interval } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADS_TYPEDNAME {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADS_TYPEDNAME { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ADS_USER_FLAG_ENUM(pub i32); pub const ADS_UF_SCRIPT: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(1i32); pub const ADS_UF_ACCOUNTDISABLE: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(2i32); pub const ADS_UF_HOMEDIR_REQUIRED: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(8i32); pub const ADS_UF_LOCKOUT: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(16i32); pub const ADS_UF_PASSWD_NOTREQD: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(32i32); pub const ADS_UF_PASSWD_CANT_CHANGE: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(64i32); pub const ADS_UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(128i32); pub const ADS_UF_TEMP_DUPLICATE_ACCOUNT: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(256i32); pub const ADS_UF_NORMAL_ACCOUNT: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(512i32); pub const ADS_UF_INTERDOMAIN_TRUST_ACCOUNT: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(2048i32); pub const ADS_UF_WORKSTATION_TRUST_ACCOUNT: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(4096i32); pub const ADS_UF_SERVER_TRUST_ACCOUNT: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(8192i32); pub const ADS_UF_DONT_EXPIRE_PASSWD: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(65536i32); pub const ADS_UF_MNS_LOGON_ACCOUNT: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(131072i32); pub const ADS_UF_SMARTCARD_REQUIRED: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(262144i32); pub const ADS_UF_TRUSTED_FOR_DELEGATION: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(524288i32); pub const ADS_UF_NOT_DELEGATED: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(1048576i32); pub const ADS_UF_USE_DES_KEY_ONLY: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(2097152i32); pub const ADS_UF_DONT_REQUIRE_PREAUTH: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(4194304i32); pub const ADS_UF_PASSWORD_EXPIRED: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(8388608i32); pub const ADS_UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION: ADS_USER_FLAG_ENUM = ADS_USER_FLAG_ENUM(16777216i32); impl ::core::convert::From<i32> for ADS_USER_FLAG_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ADS_USER_FLAG_ENUM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ADS_VLV { pub dwBeforeCount: u32, pub dwAfterCount: u32, pub dwOffset: u32, pub dwContentCount: u32, pub pszTarget: super::super::Foundation::PWSTR, pub dwContextIDLength: u32, pub lpContextID: *mut u8, } #[cfg(feature = "Win32_Foundation")] impl ADS_VLV {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ADS_VLV { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ADS_VLV { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ADS_VLV") .field("dwBeforeCount", &self.dwBeforeCount) .field("dwAfterCount", &self.dwAfterCount) .field("dwOffset", &self.dwOffset) .field("dwContentCount", &self.dwContentCount) .field("pszTarget", &self.pszTarget) .field("dwContextIDLength", &self.dwContextIDLength) .field("lpContextID", &self.lpContextID) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ADS_VLV { fn eq(&self, other: &Self) -> bool { self.dwBeforeCount == other.dwBeforeCount && self.dwAfterCount == other.dwAfterCount && self.dwOffset == other.dwOffset && self.dwContentCount == other.dwContentCount && self.pszTarget == other.pszTarget && self.dwContextIDLength == other.dwContextIDLength && self.lpContextID == other.lpContextID } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ADS_VLV {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ADS_VLV { type Abi = Self; } pub const ADSystemInfo: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x50b6327f_afd1_11d2_9cb9_0000f87a369e); #[cfg(feature = "Win32_System_Ole")] #[inline] pub unsafe fn ADsBuildEnumerator<'a, Param0: ::windows::core::IntoParam<'a, IADsContainer>>(padscontainer: Param0) -> ::windows::core::Result<super::super::System::Ole::IEnumVARIANT> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsBuildEnumerator(padscontainer: ::windows::core::RawPtr, ppenumvariant: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT; } let mut result__: <super::super::System::Ole::IEnumVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); ADsBuildEnumerator(padscontainer.into_param().abi(), &mut result__).from_abi::<super::super::System::Ole::IEnumVARIANT>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn ADsBuildVarArrayInt(lpdwobjecttypes: *mut u32, dwobjecttypes: u32, pvar: *mut super::super::System::Com::VARIANT) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsBuildVarArrayInt(lpdwobjecttypes: *mut u32, dwobjecttypes: u32, pvar: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT; } ADsBuildVarArrayInt(::core::mem::transmute(lpdwobjecttypes), ::core::mem::transmute(dwobjecttypes), ::core::mem::transmute(pvar)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn ADsBuildVarArrayStr(lpppathnames: *const super::super::Foundation::PWSTR, dwpathnames: u32, pvar: *mut super::super::System::Com::VARIANT) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsBuildVarArrayStr(lpppathnames: *const super::super::Foundation::PWSTR, dwpathnames: u32, pvar: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT; } ADsBuildVarArrayStr(::core::mem::transmute(lpppathnames), ::core::mem::transmute(dwpathnames), ::core::mem::transmute(pvar)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ADsDecodeBinaryData<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(szsrcdata: Param0, ppbdestdata: *mut *mut u8, pdwdestlen: *mut u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsDecodeBinaryData(szsrcdata: super::super::Foundation::PWSTR, ppbdestdata: *mut *mut u8, pdwdestlen: *mut u32) -> ::windows::core::HRESULT; } ADsDecodeBinaryData(szsrcdata.into_param().abi(), ::core::mem::transmute(ppbdestdata), ::core::mem::transmute(pdwdestlen)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ADsEncodeBinaryData(pbsrcdata: *mut u8, dwsrclen: u32, ppszdestdata: *mut super::super::Foundation::PWSTR) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsEncodeBinaryData(pbsrcdata: *mut u8, dwsrclen: u32, ppszdestdata: *mut super::super::Foundation::PWSTR) -> ::windows::core::HRESULT; } ADsEncodeBinaryData(::core::mem::transmute(pbsrcdata), ::core::mem::transmute(dwsrclen), ::core::mem::transmute(ppszdestdata)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn ADsEnumerateNext<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Ole::IEnumVARIANT>>(penumvariant: Param0, celements: u32, pvar: *mut super::super::System::Com::VARIANT, pcelementsfetched: *mut u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsEnumerateNext(penumvariant: ::windows::core::RawPtr, celements: u32, pvar: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pcelementsfetched: *mut u32) -> ::windows::core::HRESULT; } ADsEnumerateNext(penumvariant.into_param().abi(), ::core::mem::transmute(celements), ::core::mem::transmute(pvar), ::core::mem::transmute(pcelementsfetched)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_System_Ole")] #[inline] pub unsafe fn ADsFreeEnumerator<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Ole::IEnumVARIANT>>(penumvariant: Param0) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsFreeEnumerator(penumvariant: ::windows::core::RawPtr) -> ::windows::core::HRESULT; } ADsFreeEnumerator(penumvariant.into_param().abi()).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ADsGetLastError(lperror: *mut u32, lperrorbuf: super::super::Foundation::PWSTR, dwerrorbuflen: u32, lpnamebuf: super::super::Foundation::PWSTR, dwnamebuflen: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsGetLastError(lperror: *mut u32, lperrorbuf: super::super::Foundation::PWSTR, dwerrorbuflen: u32, lpnamebuf: super::super::Foundation::PWSTR, dwnamebuflen: u32) -> ::windows::core::HRESULT; } ADsGetLastError(::core::mem::transmute(lperror), ::core::mem::transmute(lperrorbuf), ::core::mem::transmute(dwerrorbuflen), ::core::mem::transmute(lpnamebuf), ::core::mem::transmute(dwnamebuflen)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ADsGetObject<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(lpszpathname: Param0, riid: *const ::windows::core::GUID, ppobject: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsGetObject(lpszpathname: super::super::Foundation::PWSTR, riid: *const ::windows::core::GUID, ppobject: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT; } ADsGetObject(lpszpathname.into_param().abi(), ::core::mem::transmute(riid), ::core::mem::transmute(ppobject)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ADsOpenObject<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(lpszpathname: Param0, lpszusername: Param1, lpszpassword: Param2, dwreserved: ADS_AUTHENTICATION_ENUM, riid: *const ::windows::core::GUID, ppobject: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsOpenObject(lpszpathname: super::super::Foundation::PWSTR, lpszusername: super::super::Foundation::PWSTR, lpszpassword: super::super::Foundation::PWSTR, dwreserved: ADS_AUTHENTICATION_ENUM, riid: *const ::windows::core::GUID, ppobject: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT; } ADsOpenObject(lpszpathname.into_param().abi(), lpszusername.into_param().abi(), lpszpassword.into_param().abi(), ::core::mem::transmute(dwreserved), ::core::mem::transmute(riid), ::core::mem::transmute(ppobject)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ADsPropCheckIfWritable<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pwzattr: Param0, pwritableattrs: *const ADS_ATTR_INFO) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsPropCheckIfWritable(pwzattr: super::super::Foundation::PWSTR, pwritableattrs: *const ADS_ATTR_INFO) -> super::super::Foundation::BOOL; } ::core::mem::transmute(ADsPropCheckIfWritable(pwzattr.into_param().abi(), ::core::mem::transmute(pwritableattrs))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] #[inline] pub unsafe fn ADsPropCreateNotifyObj<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::IDataObject>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pappthddataobj: Param0, pwzadsobjname: Param1, phnotifyobj: *mut super::super::Foundation::HWND) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsPropCreateNotifyObj(pappthddataobj: ::windows::core::RawPtr, pwzadsobjname: super::super::Foundation::PWSTR, phnotifyobj: *mut super::super::Foundation::HWND) -> ::windows::core::HRESULT; } ADsPropCreateNotifyObj(pappthddataobj.into_param().abi(), pwzadsobjname.into_param().abi(), ::core::mem::transmute(phnotifyobj)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ADsPropGetInitInfo<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hnotifyobj: Param0, pinitparams: *mut ADSPROPINITPARAMS) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsPropGetInitInfo(hnotifyobj: super::super::Foundation::HWND, pinitparams: *mut ::core::mem::ManuallyDrop<ADSPROPINITPARAMS>) -> super::super::Foundation::BOOL; } ::core::mem::transmute(ADsPropGetInitInfo(hnotifyobj.into_param().abi(), ::core::mem::transmute(pinitparams))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ADsPropSendErrorMessage<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hnotifyobj: Param0, perror: *mut ADSPROPERROR) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsPropSendErrorMessage(hnotifyobj: super::super::Foundation::HWND, perror: *mut ADSPROPERROR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(ADsPropSendErrorMessage(hnotifyobj.into_param().abi(), ::core::mem::transmute(perror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ADsPropSetHwnd<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hnotifyobj: Param0, hpage: Param1) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsPropSetHwnd(hnotifyobj: super::super::Foundation::HWND, hpage: super::super::Foundation::HWND) -> super::super::Foundation::BOOL; } ::core::mem::transmute(ADsPropSetHwnd(hnotifyobj.into_param().abi(), hpage.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ADsPropSetHwndWithTitle<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hnotifyobj: Param0, hpage: Param1, ptztitle: *const i8) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsPropSetHwndWithTitle(hnotifyobj: super::super::Foundation::HWND, hpage: super::super::Foundation::HWND, ptztitle: *const i8) -> super::super::Foundation::BOOL; } ::core::mem::transmute(ADsPropSetHwndWithTitle(hnotifyobj.into_param().abi(), hpage.into_param().abi(), ::core::mem::transmute(ptztitle))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ADsPropShowErrorDialog<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hnotifyobj: Param0, hpage: Param1) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsPropShowErrorDialog(hnotifyobj: super::super::Foundation::HWND, hpage: super::super::Foundation::HWND) -> super::super::Foundation::BOOL; } ::core::mem::transmute(ADsPropShowErrorDialog(hnotifyobj.into_param().abi(), hpage.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const ADsSecurityUtility: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf270c64a_ffb8_4ae4_85fe_3a75e5347966); #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ADsSetLastError<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwerr: u32, pszerror: Param1, pszprovider: Param2) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ADsSetLastError(dwerr: u32, pszerror: super::super::Foundation::PWSTR, pszprovider: super::super::Foundation::PWSTR); } ::core::mem::transmute(ADsSetLastError(::core::mem::transmute(dwerr), pszerror.into_param().abi(), pszprovider.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const AccessControlEntry: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb75ac000_9bdd_11d0_852c_00c04fd8d503); pub const AccessControlList: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb85ea052_9bdd_11d0_852c_00c04fd8d503); #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn AdsFreeAdsValues(padsvalues: *mut ADSVALUE, dwnumvalues: u32) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn AdsFreeAdsValues(padsvalues: *mut ADSVALUE, dwnumvalues: u32); } ::core::mem::transmute(AdsFreeAdsValues(::core::mem::transmute(padsvalues), ::core::mem::transmute(dwnumvalues))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn AdsTypeToPropVariant(padsvalues: *mut ADSVALUE, dwnumvalues: u32, pvariant: *mut super::super::System::Com::VARIANT) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn AdsTypeToPropVariant(padsvalues: *mut ADSVALUE, dwnumvalues: u32, pvariant: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT; } AdsTypeToPropVariant(::core::mem::transmute(padsvalues), ::core::mem::transmute(dwnumvalues), ::core::mem::transmute(pvariant)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn AllocADsMem(cb: u32) -> *mut ::core::ffi::c_void { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn AllocADsMem(cb: u32) -> *mut ::core::ffi::c_void; } ::core::mem::transmute(AllocADsMem(::core::mem::transmute(cb))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn AllocADsStr<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pstr: Param0) -> super::super::Foundation::PWSTR { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn AllocADsStr(pstr: super::super::Foundation::PWSTR) -> super::super::Foundation::PWSTR; } ::core::mem::transmute(AllocADsStr(pstr.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const BackLink: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfcbf906f_4080_11d1_a3ac_00c04fb950dc); #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn BinarySDToSecurityDescriptor<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(psecuritydescriptor: *mut super::super::Security::SECURITY_DESCRIPTOR, pvarsec: *mut super::super::System::Com::VARIANT, pszservername: Param2, username: Param3, password: Param4, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BinarySDToSecurityDescriptor(psecuritydescriptor: *mut super::super::Security::SECURITY_DESCRIPTOR, pvarsec: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pszservername: super::super::Foundation::PWSTR, username: super::super::Foundation::PWSTR, password: super::super::Foundation::PWSTR, dwflags: u32) -> ::windows::core::HRESULT; } BinarySDToSecurityDescriptor(::core::mem::transmute(psecuritydescriptor), ::core::mem::transmute(pvarsec), pszservername.into_param().abi(), username.into_param().abi(), password.into_param().abi(), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const CLSID_CommonQuery: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x83bc5ec0_6f2a_11d0_a1c4_00aa00c16e65); pub const CLSID_DsAdminCreateObj: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe301a009_f901_11d2_82b9_00c04f68928b); pub const CLSID_DsDisplaySpecifier: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1ab4a8c0_6a0b_11d2_ad49_00c04fa31a86); pub const CLSID_DsDomainTreeBrowser: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1698790a_e2b4_11d0_b0b1_00c04fd8dca6); pub const CLSID_DsFindAdvanced: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x83ee3fe3_57d9_11d0_b932_00a024ab2dbb); pub const CLSID_DsFindComputer: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x16006700_87ad_11d0_9140_00aa00c16e65); pub const CLSID_DsFindContainer: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc1b3cbf2_886a_11d0_9140_00aa00c16e65); pub const CLSID_DsFindDomainController: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x538c7b7e_d25e_11d0_9742_00a0c906af45); pub const CLSID_DsFindFrsMembers: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x94ce4b18_b3d3_11d1_b9b4_00c04fd8d5b0); pub const CLSID_DsFindObjects: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x83ee3fe1_57d9_11d0_b932_00a024ab2dbb); pub const CLSID_DsFindPeople: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x83ee3fe2_57d9_11d0_b932_00a024ab2dbb); pub const CLSID_DsFindPrinter: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb577f070_7ee2_11d0_913f_00aa00c16e65); pub const CLSID_DsFindVolume: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc1b3cbf1_886a_11d0_9140_00aa00c16e65); pub const CLSID_DsFindWriteableDomainController: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7cbef079_aa84_444b_bc70_68e41283eabc); pub const CLSID_DsFolderProperties: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9e51e0d0_6e0f_11d2_9601_00c04fa31a86); pub const CLSID_DsObjectPicker: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x17d6ccd8_3b7b_11d2_b9e0_00c04fd8dbf7); pub const CLSID_DsPropertyPages: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0d45d530_764b_11d0_a1ca_00aa00c16e65); pub const CLSID_DsQuery: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8a23e65e_31c2_11d0_891c_00a024ab2dbb); pub const CLSID_MicrosoftDS: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfe1290f0_cfbd_11cf_a330_00aa00c16e65); pub const CQFF_ISOPTIONAL: u32 = 2u32; pub const CQFF_NOGLOBALPAGES: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub struct CQFORM { pub cbStruct: u32, pub dwFlags: u32, pub clsid: ::windows::core::GUID, pub hIcon: super::super::UI::WindowsAndMessaging::HICON, pub pszTitle: super::super::Foundation::PWSTR, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl CQFORM {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::default::Default for CQFORM { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::fmt::Debug for CQFORM { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CQFORM").field("cbStruct", &self.cbStruct).field("dwFlags", &self.dwFlags).field("clsid", &self.clsid).field("hIcon", &self.hIcon).field("pszTitle", &self.pszTitle).finish() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::cmp::PartialEq for CQFORM { fn eq(&self, other: &Self) -> bool { self.cbStruct == other.cbStruct && self.dwFlags == other.dwFlags && self.clsid == other.clsid && self.hIcon == other.hIcon && self.pszTitle == other.pszTitle } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::cmp::Eq for CQFORM {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] unsafe impl ::windows::core::Abi for CQFORM { type Abi = Self; } #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub struct CQPAGE { pub cbStruct: u32, pub dwFlags: u32, pub pPageProc: ::core::option::Option<LPCQPAGEPROC>, pub hInstance: super::super::Foundation::HINSTANCE, pub idPageName: i32, pub idPageTemplate: i32, pub pDlgProc: ::core::option::Option<super::super::UI::WindowsAndMessaging::DLGPROC>, pub lParam: super::super::Foundation::LPARAM, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl CQPAGE {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::default::Default for CQPAGE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::fmt::Debug for CQPAGE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CQPAGE").field("cbStruct", &self.cbStruct).field("dwFlags", &self.dwFlags).field("hInstance", &self.hInstance).field("idPageName", &self.idPageName).field("idPageTemplate", &self.idPageTemplate).field("lParam", &self.lParam).finish() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::cmp::PartialEq for CQPAGE { fn eq(&self, other: &Self) -> bool { self.cbStruct == other.cbStruct && self.dwFlags == other.dwFlags && self.pPageProc.map(|f| f as usize) == other.pPageProc.map(|f| f as usize) && self.hInstance == other.hInstance && self.idPageName == other.idPageName && self.idPageTemplate == other.idPageTemplate && self.pDlgProc.map(|f| f as usize) == other.pDlgProc.map(|f| f as usize) && self.lParam == other.lParam } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::cmp::Eq for CQPAGE {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] unsafe impl ::windows::core::Abi for CQPAGE { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const CQPM_CLEARFORM: u32 = 6u32; pub const CQPM_ENABLE: u32 = 3u32; pub const CQPM_GETPARAMETERS: u32 = 5u32; pub const CQPM_HANDLERSPECIFIC: u32 = 268435456u32; pub const CQPM_HELP: u32 = 8u32; pub const CQPM_INITIALIZE: u32 = 1u32; pub const CQPM_PERSIST: u32 = 7u32; pub const CQPM_RELEASE: u32 = 2u32; pub const CQPM_SETDEFAULTPARAMETERS: u32 = 9u32; pub const CaseIgnoreList: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x15f88a55_4680_11d1_a3b4_00c04fb950dc); pub const DBDTF_RETURNEXTERNAL: u32 = 4u32; pub const DBDTF_RETURNFQDN: u32 = 1u32; pub const DBDTF_RETURNINBOUND: u32 = 8u32; pub const DBDTF_RETURNINOUTBOUND: u32 = 16u32; pub const DBDTF_RETURNMIXEDDOMAINS: u32 = 2u32; pub const DNWithBinary: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7e99c0a3_f935_11d2_ba96_00c04fb6d0d1); pub const DNWithString: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x334857cc_f934_11d2_ba96_00c04fb6d0d1); #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DOMAINDESC { pub pszName: super::super::Foundation::PWSTR, pub pszPath: super::super::Foundation::PWSTR, pub pszNCName: super::super::Foundation::PWSTR, pub pszTrustParent: super::super::Foundation::PWSTR, pub pszObjectClass: super::super::Foundation::PWSTR, pub ulFlags: u32, pub fDownLevel: super::super::Foundation::BOOL, pub pdChildList: *mut DOMAINDESC, pub pdNextSibling: *mut DOMAINDESC, } #[cfg(feature = "Win32_Foundation")] impl DOMAINDESC {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DOMAINDESC { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DOMAINDESC { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DOMAINDESC") .field("pszName", &self.pszName) .field("pszPath", &self.pszPath) .field("pszNCName", &self.pszNCName) .field("pszTrustParent", &self.pszTrustParent) .field("pszObjectClass", &self.pszObjectClass) .field("ulFlags", &self.ulFlags) .field("fDownLevel", &self.fDownLevel) .field("pdChildList", &self.pdChildList) .field("pdNextSibling", &self.pdNextSibling) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DOMAINDESC { fn eq(&self, other: &Self) -> bool { self.pszName == other.pszName && self.pszPath == other.pszPath && self.pszNCName == other.pszNCName && self.pszTrustParent == other.pszTrustParent && self.pszObjectClass == other.pszObjectClass && self.ulFlags == other.ulFlags && self.fDownLevel == other.fDownLevel && self.pdChildList == other.pdChildList && self.pdNextSibling == other.pdNextSibling } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DOMAINDESC {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DOMAINDESC { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DOMAIN_CONTROLLER_INFOA { pub DomainControllerName: super::super::Foundation::PSTR, pub DomainControllerAddress: super::super::Foundation::PSTR, pub DomainControllerAddressType: u32, pub DomainGuid: ::windows::core::GUID, pub DomainName: super::super::Foundation::PSTR, pub DnsForestName: super::super::Foundation::PSTR, pub Flags: u32, pub DcSiteName: super::super::Foundation::PSTR, pub ClientSiteName: super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl DOMAIN_CONTROLLER_INFOA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DOMAIN_CONTROLLER_INFOA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DOMAIN_CONTROLLER_INFOA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DOMAIN_CONTROLLER_INFOA") .field("DomainControllerName", &self.DomainControllerName) .field("DomainControllerAddress", &self.DomainControllerAddress) .field("DomainControllerAddressType", &self.DomainControllerAddressType) .field("DomainGuid", &self.DomainGuid) .field("DomainName", &self.DomainName) .field("DnsForestName", &self.DnsForestName) .field("Flags", &self.Flags) .field("DcSiteName", &self.DcSiteName) .field("ClientSiteName", &self.ClientSiteName) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DOMAIN_CONTROLLER_INFOA { fn eq(&self, other: &Self) -> bool { self.DomainControllerName == other.DomainControllerName && self.DomainControllerAddress == other.DomainControllerAddress && self.DomainControllerAddressType == other.DomainControllerAddressType && self.DomainGuid == other.DomainGuid && self.DomainName == other.DomainName && self.DnsForestName == other.DnsForestName && self.Flags == other.Flags && self.DcSiteName == other.DcSiteName && self.ClientSiteName == other.ClientSiteName } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DOMAIN_CONTROLLER_INFOA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DOMAIN_CONTROLLER_INFOA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DOMAIN_CONTROLLER_INFOW { pub DomainControllerName: super::super::Foundation::PWSTR, pub DomainControllerAddress: super::super::Foundation::PWSTR, pub DomainControllerAddressType: u32, pub DomainGuid: ::windows::core::GUID, pub DomainName: super::super::Foundation::PWSTR, pub DnsForestName: super::super::Foundation::PWSTR, pub Flags: u32, pub DcSiteName: super::super::Foundation::PWSTR, pub ClientSiteName: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl DOMAIN_CONTROLLER_INFOW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DOMAIN_CONTROLLER_INFOW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DOMAIN_CONTROLLER_INFOW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DOMAIN_CONTROLLER_INFOW") .field("DomainControllerName", &self.DomainControllerName) .field("DomainControllerAddress", &self.DomainControllerAddress) .field("DomainControllerAddressType", &self.DomainControllerAddressType) .field("DomainGuid", &self.DomainGuid) .field("DomainName", &self.DomainName) .field("DnsForestName", &self.DnsForestName) .field("Flags", &self.Flags) .field("DcSiteName", &self.DcSiteName) .field("ClientSiteName", &self.ClientSiteName) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DOMAIN_CONTROLLER_INFOW { fn eq(&self, other: &Self) -> bool { self.DomainControllerName == other.DomainControllerName && self.DomainControllerAddress == other.DomainControllerAddress && self.DomainControllerAddressType == other.DomainControllerAddressType && self.DomainGuid == other.DomainGuid && self.DomainName == other.DomainName && self.DnsForestName == other.DnsForestName && self.Flags == other.Flags && self.DcSiteName == other.DcSiteName && self.ClientSiteName == other.ClientSiteName } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DOMAIN_CONTROLLER_INFOW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DOMAIN_CONTROLLER_INFOW { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DOMAIN_TREE { pub dsSize: u32, pub dwCount: u32, pub aDomains: [DOMAINDESC; 1], } #[cfg(feature = "Win32_Foundation")] impl DOMAIN_TREE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DOMAIN_TREE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DOMAIN_TREE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DOMAIN_TREE").field("dsSize", &self.dsSize).field("dwCount", &self.dwCount).field("aDomains", &self.aDomains).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DOMAIN_TREE { fn eq(&self, other: &Self) -> bool { self.dsSize == other.dsSize && self.dwCount == other.dwCount && self.aDomains == other.aDomains } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DOMAIN_TREE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DOMAIN_TREE { type Abi = Self; } pub const DSA_NEWOBJ_CTX_CLEANUP: u32 = 4u32; pub const DSA_NEWOBJ_CTX_COMMIT: u32 = 2u32; pub const DSA_NEWOBJ_CTX_POSTCOMMIT: u32 = 3u32; pub const DSA_NEWOBJ_CTX_PRECOMMIT: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub struct DSA_NEWOBJ_DISPINFO { pub dwSize: u32, pub hObjClassIcon: super::super::UI::WindowsAndMessaging::HICON, pub lpszWizTitle: super::super::Foundation::PWSTR, pub lpszContDisplayName: super::super::Foundation::PWSTR, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl DSA_NEWOBJ_DISPINFO {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::default::Default for DSA_NEWOBJ_DISPINFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::fmt::Debug for DSA_NEWOBJ_DISPINFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSA_NEWOBJ_DISPINFO").field("dwSize", &self.dwSize).field("hObjClassIcon", &self.hObjClassIcon).field("lpszWizTitle", &self.lpszWizTitle).field("lpszContDisplayName", &self.lpszContDisplayName).finish() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::cmp::PartialEq for DSA_NEWOBJ_DISPINFO { fn eq(&self, other: &Self) -> bool { self.dwSize == other.dwSize && self.hObjClassIcon == other.hObjClassIcon && self.lpszWizTitle == other.lpszWizTitle && self.lpszContDisplayName == other.lpszContDisplayName } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::cmp::Eq for DSA_NEWOBJ_DISPINFO {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] unsafe impl ::windows::core::Abi for DSA_NEWOBJ_DISPINFO { type Abi = Self; } pub const DSA_NOTIFY_DEL: u32 = 1u32; pub const DSA_NOTIFY_FLAG_ADDITIONAL_DATA: u32 = 2u32; pub const DSA_NOTIFY_FLAG_FORCE_ADDITIONAL_DATA: u32 = 1u32; pub const DSA_NOTIFY_MOV: u32 = 4u32; pub const DSA_NOTIFY_PROP: u32 = 8u32; pub const DSA_NOTIFY_REN: u32 = 2u32; pub const DSBF_DISPLAYNAME: u32 = 4u32; pub const DSBF_ICONLOCATION: u32 = 2u32; pub const DSBF_STATE: u32 = 1u32; pub const DSBID_BANNER: u32 = 256u32; pub const DSBID_CONTAINERLIST: u32 = 257u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DSBITEMA { pub cbStruct: u32, pub pszADsPath: super::super::Foundation::PWSTR, pub pszClass: super::super::Foundation::PWSTR, pub dwMask: u32, pub dwState: u32, pub dwStateMask: u32, pub szDisplayName: [super::super::Foundation::CHAR; 64], pub szIconLocation: [super::super::Foundation::CHAR; 260], pub iIconResID: i32, } #[cfg(feature = "Win32_Foundation")] impl DSBITEMA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DSBITEMA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DSBITEMA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSBITEMA") .field("cbStruct", &self.cbStruct) .field("pszADsPath", &self.pszADsPath) .field("pszClass", &self.pszClass) .field("dwMask", &self.dwMask) .field("dwState", &self.dwState) .field("dwStateMask", &self.dwStateMask) .field("szDisplayName", &self.szDisplayName) .field("szIconLocation", &self.szIconLocation) .field("iIconResID", &self.iIconResID) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DSBITEMA { fn eq(&self, other: &Self) -> bool { self.cbStruct == other.cbStruct && self.pszADsPath == other.pszADsPath && self.pszClass == other.pszClass && self.dwMask == other.dwMask && self.dwState == other.dwState && self.dwStateMask == other.dwStateMask && self.szDisplayName == other.szDisplayName && self.szIconLocation == other.szIconLocation && self.iIconResID == other.iIconResID } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DSBITEMA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DSBITEMA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DSBITEMW { pub cbStruct: u32, pub pszADsPath: super::super::Foundation::PWSTR, pub pszClass: super::super::Foundation::PWSTR, pub dwMask: u32, pub dwState: u32, pub dwStateMask: u32, pub szDisplayName: [u16; 64], pub szIconLocation: [u16; 260], pub iIconResID: i32, } #[cfg(feature = "Win32_Foundation")] impl DSBITEMW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DSBITEMW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DSBITEMW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSBITEMW") .field("cbStruct", &self.cbStruct) .field("pszADsPath", &self.pszADsPath) .field("pszClass", &self.pszClass) .field("dwMask", &self.dwMask) .field("dwState", &self.dwState) .field("dwStateMask", &self.dwStateMask) .field("szDisplayName", &self.szDisplayName) .field("szIconLocation", &self.szIconLocation) .field("iIconResID", &self.iIconResID) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DSBITEMW { fn eq(&self, other: &Self) -> bool { self.cbStruct == other.cbStruct && self.pszADsPath == other.pszADsPath && self.pszClass == other.pszClass && self.dwMask == other.dwMask && self.dwState == other.dwState && self.dwStateMask == other.dwStateMask && self.szDisplayName == other.szDisplayName && self.szIconLocation == other.szIconLocation && self.iIconResID == other.iIconResID } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DSBITEMW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DSBITEMW { type Abi = Self; } pub const DSBI_CHECKBOXES: u32 = 256u32; pub const DSBI_DONTSIGNSEAL: u32 = 33554432u32; pub const DSBI_ENTIREDIRECTORY: u32 = 589824u32; pub const DSBI_EXPANDONOPEN: u32 = 262144u32; pub const DSBI_HASCREDENTIALS: u32 = 2097152u32; pub const DSBI_IGNORETREATASLEAF: u32 = 4194304u32; pub const DSBI_INCLUDEHIDDEN: u32 = 131072u32; pub const DSBI_NOBUTTONS: u32 = 1u32; pub const DSBI_NOLINES: u32 = 2u32; pub const DSBI_NOLINESATROOT: u32 = 4u32; pub const DSBI_NOROOT: u32 = 65536u32; pub const DSBI_RETURNOBJECTCLASS: u32 = 16777216u32; pub const DSBI_RETURN_FORMAT: u32 = 1048576u32; pub const DSBI_SIMPLEAUTHENTICATE: u32 = 8388608u32; pub const DSBM_CHANGEIMAGESTATE: u32 = 102u32; pub const DSBM_CONTEXTMENU: u32 = 104u32; pub const DSBM_HELP: u32 = 103u32; pub const DSBM_QUERYINSERT: u32 = 100u32; pub const DSBM_QUERYINSERTA: u32 = 101u32; pub const DSBM_QUERYINSERTW: u32 = 100u32; #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] pub struct DSBROWSEINFOA { pub cbStruct: u32, pub hwndOwner: super::super::Foundation::HWND, pub pszCaption: super::super::Foundation::PSTR, pub pszTitle: super::super::Foundation::PSTR, pub pszRoot: super::super::Foundation::PWSTR, pub pszPath: super::super::Foundation::PWSTR, pub cchPath: u32, pub dwFlags: u32, pub pfnCallback: ::core::option::Option<super::super::UI::Shell::BFFCALLBACK>, pub lParam: super::super::Foundation::LPARAM, pub dwReturnFormat: u32, pub pUserName: super::super::Foundation::PWSTR, pub pPassword: super::super::Foundation::PWSTR, pub pszObjectClass: super::super::Foundation::PWSTR, pub cchObjectClass: u32, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] impl DSBROWSEINFOA {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] impl ::core::default::Default for DSBROWSEINFOA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] impl ::core::fmt::Debug for DSBROWSEINFOA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSBROWSEINFOA") .field("cbStruct", &self.cbStruct) .field("hwndOwner", &self.hwndOwner) .field("pszCaption", &self.pszCaption) .field("pszTitle", &self.pszTitle) .field("pszRoot", &self.pszRoot) .field("pszPath", &self.pszPath) .field("cchPath", &self.cchPath) .field("dwFlags", &self.dwFlags) .field("lParam", &self.lParam) .field("dwReturnFormat", &self.dwReturnFormat) .field("pUserName", &self.pUserName) .field("pPassword", &self.pPassword) .field("pszObjectClass", &self.pszObjectClass) .field("cchObjectClass", &self.cchObjectClass) .finish() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] impl ::core::cmp::PartialEq for DSBROWSEINFOA { fn eq(&self, other: &Self) -> bool { self.cbStruct == other.cbStruct && self.hwndOwner == other.hwndOwner && self.pszCaption == other.pszCaption && self.pszTitle == other.pszTitle && self.pszRoot == other.pszRoot && self.pszPath == other.pszPath && self.cchPath == other.cchPath && self.dwFlags == other.dwFlags && self.pfnCallback.map(|f| f as usize) == other.pfnCallback.map(|f| f as usize) && self.lParam == other.lParam && self.dwReturnFormat == other.dwReturnFormat && self.pUserName == other.pUserName && self.pPassword == other.pPassword && self.pszObjectClass == other.pszObjectClass && self.cchObjectClass == other.cchObjectClass } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] impl ::core::cmp::Eq for DSBROWSEINFOA {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] unsafe impl ::windows::core::Abi for DSBROWSEINFOA { type Abi = ::core::mem::ManuallyDrop<Self>; } #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] pub struct DSBROWSEINFOW { pub cbStruct: u32, pub hwndOwner: super::super::Foundation::HWND, pub pszCaption: super::super::Foundation::PWSTR, pub pszTitle: super::super::Foundation::PWSTR, pub pszRoot: super::super::Foundation::PWSTR, pub pszPath: super::super::Foundation::PWSTR, pub cchPath: u32, pub dwFlags: u32, pub pfnCallback: ::core::option::Option<super::super::UI::Shell::BFFCALLBACK>, pub lParam: super::super::Foundation::LPARAM, pub dwReturnFormat: u32, pub pUserName: super::super::Foundation::PWSTR, pub pPassword: super::super::Foundation::PWSTR, pub pszObjectClass: super::super::Foundation::PWSTR, pub cchObjectClass: u32, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] impl DSBROWSEINFOW {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] impl ::core::default::Default for DSBROWSEINFOW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] impl ::core::fmt::Debug for DSBROWSEINFOW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSBROWSEINFOW") .field("cbStruct", &self.cbStruct) .field("hwndOwner", &self.hwndOwner) .field("pszCaption", &self.pszCaption) .field("pszTitle", &self.pszTitle) .field("pszRoot", &self.pszRoot) .field("pszPath", &self.pszPath) .field("cchPath", &self.cchPath) .field("dwFlags", &self.dwFlags) .field("lParam", &self.lParam) .field("dwReturnFormat", &self.dwReturnFormat) .field("pUserName", &self.pUserName) .field("pPassword", &self.pPassword) .field("pszObjectClass", &self.pszObjectClass) .field("cchObjectClass", &self.cchObjectClass) .finish() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] impl ::core::cmp::PartialEq for DSBROWSEINFOW { fn eq(&self, other: &Self) -> bool { self.cbStruct == other.cbStruct && self.hwndOwner == other.hwndOwner && self.pszCaption == other.pszCaption && self.pszTitle == other.pszTitle && self.pszRoot == other.pszRoot && self.pszPath == other.pszPath && self.cchPath == other.cchPath && self.dwFlags == other.dwFlags && self.pfnCallback.map(|f| f as usize) == other.pfnCallback.map(|f| f as usize) && self.lParam == other.lParam && self.dwReturnFormat == other.dwReturnFormat && self.pUserName == other.pUserName && self.pPassword == other.pPassword && self.pszObjectClass == other.pszObjectClass && self.cchObjectClass == other.cchObjectClass } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] impl ::core::cmp::Eq for DSBROWSEINFOW {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] unsafe impl ::windows::core::Abi for DSBROWSEINFOW { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const DSBS_CHECKED: u32 = 1u32; pub const DSBS_HIDDEN: u32 = 2u32; pub const DSBS_ROOT: u32 = 4u32; pub const DSB_MAX_DISPLAYNAME_CHARS: u32 = 64u32; pub const DSCCIF_HASWIZARDDIALOG: u32 = 1u32; pub const DSCCIF_HASWIZARDPRIMARYPAGE: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct DSCLASSCREATIONINFO { pub dwFlags: u32, pub clsidWizardDialog: ::windows::core::GUID, pub clsidWizardPrimaryPage: ::windows::core::GUID, pub cWizardExtensions: u32, pub aWizardExtensions: [::windows::core::GUID; 1], } impl DSCLASSCREATIONINFO {} impl ::core::default::Default for DSCLASSCREATIONINFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for DSCLASSCREATIONINFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSCLASSCREATIONINFO").field("dwFlags", &self.dwFlags).field("clsidWizardDialog", &self.clsidWizardDialog).field("clsidWizardPrimaryPage", &self.clsidWizardPrimaryPage).field("cWizardExtensions", &self.cWizardExtensions).field("aWizardExtensions", &self.aWizardExtensions).finish() } } impl ::core::cmp::PartialEq for DSCLASSCREATIONINFO { fn eq(&self, other: &Self) -> bool { self.dwFlags == other.dwFlags && self.clsidWizardDialog == other.clsidWizardDialog && self.clsidWizardPrimaryPage == other.clsidWizardPrimaryPage && self.cWizardExtensions == other.cWizardExtensions && self.aWizardExtensions == other.aWizardExtensions } } impl ::core::cmp::Eq for DSCLASSCREATIONINFO {} unsafe impl ::windows::core::Abi for DSCLASSCREATIONINFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct DSCOLUMN { pub dwFlags: u32, pub fmt: i32, pub cx: i32, pub idsName: i32, pub offsetProperty: i32, pub dwReserved: u32, } impl DSCOLUMN {} impl ::core::default::Default for DSCOLUMN { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for DSCOLUMN { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSCOLUMN").field("dwFlags", &self.dwFlags).field("fmt", &self.fmt).field("cx", &self.cx).field("idsName", &self.idsName).field("offsetProperty", &self.offsetProperty).field("dwReserved", &self.dwReserved).finish() } } impl ::core::cmp::PartialEq for DSCOLUMN { fn eq(&self, other: &Self) -> bool { self.dwFlags == other.dwFlags && self.fmt == other.fmt && self.cx == other.cx && self.idsName == other.idsName && self.offsetProperty == other.offsetProperty && self.dwReserved == other.dwReserved } } impl ::core::cmp::Eq for DSCOLUMN {} unsafe impl ::windows::core::Abi for DSCOLUMN { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct DSDISPLAYSPECOPTIONS { pub dwSize: u32, pub dwFlags: u32, pub offsetAttribPrefix: u32, pub offsetUserName: u32, pub offsetPassword: u32, pub offsetServer: u32, pub offsetServerConfigPath: u32, } impl DSDISPLAYSPECOPTIONS {} impl ::core::default::Default for DSDISPLAYSPECOPTIONS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for DSDISPLAYSPECOPTIONS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSDISPLAYSPECOPTIONS") .field("dwSize", &self.dwSize) .field("dwFlags", &self.dwFlags) .field("offsetAttribPrefix", &self.offsetAttribPrefix) .field("offsetUserName", &self.offsetUserName) .field("offsetPassword", &self.offsetPassword) .field("offsetServer", &self.offsetServer) .field("offsetServerConfigPath", &self.offsetServerConfigPath) .finish() } } impl ::core::cmp::PartialEq for DSDISPLAYSPECOPTIONS { fn eq(&self, other: &Self) -> bool { self.dwSize == other.dwSize && self.dwFlags == other.dwFlags && self.offsetAttribPrefix == other.offsetAttribPrefix && self.offsetUserName == other.offsetUserName && self.offsetPassword == other.offsetPassword && self.offsetServer == other.offsetServer && self.offsetServerConfigPath == other.offsetServerConfigPath } } impl ::core::cmp::Eq for DSDISPLAYSPECOPTIONS {} unsafe impl ::windows::core::Abi for DSDISPLAYSPECOPTIONS { type Abi = Self; } pub const DSDSOF_DONTSIGNSEAL: u32 = 4u32; pub const DSDSOF_DSAVAILABLE: u32 = 1073741824u32; pub const DSDSOF_HASUSERANDSERVERINFO: u32 = 1u32; pub const DSDSOF_SIMPLEAUTHENTICATE: u32 = 2u32; pub const DSECAF_NOTLISTED: u32 = 1u32; pub const DSGIF_DEFAULTISCONTAINER: u32 = 32u32; pub const DSGIF_GETDEFAULTICON: u32 = 16u32; pub const DSGIF_ISDISABLED: u32 = 2u32; pub const DSGIF_ISMASK: u32 = 15u32; pub const DSGIF_ISNORMAL: u32 = 0u32; pub const DSGIF_ISOPEN: u32 = 1u32; pub const DSICCF_IGNORETREATASLEAF: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct DSOBJECT { pub dwFlags: u32, pub dwProviderFlags: u32, pub offsetName: u32, pub offsetClass: u32, } impl DSOBJECT {} impl ::core::default::Default for DSOBJECT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for DSOBJECT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSOBJECT").field("dwFlags", &self.dwFlags).field("dwProviderFlags", &self.dwProviderFlags).field("offsetName", &self.offsetName).field("offsetClass", &self.offsetClass).finish() } } impl ::core::cmp::PartialEq for DSOBJECT { fn eq(&self, other: &Self) -> bool { self.dwFlags == other.dwFlags && self.dwProviderFlags == other.dwProviderFlags && self.offsetName == other.offsetName && self.offsetClass == other.offsetClass } } impl ::core::cmp::Eq for DSOBJECT {} unsafe impl ::windows::core::Abi for DSOBJECT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct DSOBJECTNAMES { pub clsidNamespace: ::windows::core::GUID, pub cItems: u32, pub aObjects: [DSOBJECT; 1], } impl DSOBJECTNAMES {} impl ::core::default::Default for DSOBJECTNAMES { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for DSOBJECTNAMES { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSOBJECTNAMES").field("clsidNamespace", &self.clsidNamespace).field("cItems", &self.cItems).field("aObjects", &self.aObjects).finish() } } impl ::core::cmp::PartialEq for DSOBJECTNAMES { fn eq(&self, other: &Self) -> bool { self.clsidNamespace == other.clsidNamespace && self.cItems == other.cItems && self.aObjects == other.aObjects } } impl ::core::cmp::Eq for DSOBJECTNAMES {} unsafe impl ::windows::core::Abi for DSOBJECTNAMES { type Abi = Self; } pub const DSOBJECT_ISCONTAINER: u32 = 1u32; pub const DSOBJECT_READONLYPAGES: u32 = 2147483648u32; pub const DSOP_DOWNLEVEL_FILTER_ALL_APP_PACKAGES: u32 = 2281701376u32; pub const DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS: u32 = 2147614720u32; pub const DSOP_DOWNLEVEL_FILTER_ANONYMOUS: u32 = 2147483712u32; pub const DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER: u32 = 2147483680u32; pub const DSOP_DOWNLEVEL_FILTER_BATCH: u32 = 2147483776u32; pub const DSOP_DOWNLEVEL_FILTER_COMPUTERS: u32 = 2147483656u32; pub const DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP: u32 = 2147484160u32; pub const DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER: u32 = 2147483904u32; pub const DSOP_DOWNLEVEL_FILTER_DIALUP: u32 = 2147484672u32; pub const DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS: u32 = 2147516416u32; pub const DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS: u32 = 2147483652u32; pub const DSOP_DOWNLEVEL_FILTER_IIS_APP_POOL: u32 = 2214592512u32; pub const DSOP_DOWNLEVEL_FILTER_INTERACTIVE: u32 = 2147485696u32; pub const DSOP_DOWNLEVEL_FILTER_INTERNET_USER: u32 = 2149580800u32; pub const DSOP_DOWNLEVEL_FILTER_LOCAL_ACCOUNTS: u32 = 2415919104u32; pub const DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS: u32 = 2147483650u32; pub const DSOP_DOWNLEVEL_FILTER_LOCAL_LOGON: u32 = 2164260864u32; pub const DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE: u32 = 2147745792u32; pub const DSOP_DOWNLEVEL_FILTER_NETWORK: u32 = 2147487744u32; pub const DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE: u32 = 2148007936u32; pub const DSOP_DOWNLEVEL_FILTER_OWNER_RIGHTS: u32 = 2151677952u32; pub const DSOP_DOWNLEVEL_FILTER_REMOTE_LOGON: u32 = 2148532224u32; pub const DSOP_DOWNLEVEL_FILTER_SERVICE: u32 = 2147491840u32; pub const DSOP_DOWNLEVEL_FILTER_SERVICES: u32 = 2155872256u32; pub const DSOP_DOWNLEVEL_FILTER_SYSTEM: u32 = 2147500032u32; pub const DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER: u32 = 2147549184u32; pub const DSOP_DOWNLEVEL_FILTER_THIS_ORG_CERT: u32 = 2181038080u32; pub const DSOP_DOWNLEVEL_FILTER_USERS: u32 = 2147483649u32; pub const DSOP_DOWNLEVEL_FILTER_WORLD: u32 = 2147483664u32; pub const DSOP_FILTER_BUILTIN_GROUPS: u32 = 4u32; pub const DSOP_FILTER_COMPUTERS: u32 = 2048u32; pub const DSOP_FILTER_CONTACTS: u32 = 1024u32; pub const DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL: u32 = 256u32; pub const DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE: u32 = 512u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct DSOP_FILTER_FLAGS { pub Uplevel: DSOP_UPLEVEL_FILTER_FLAGS, pub flDownlevel: u32, } impl DSOP_FILTER_FLAGS {} impl ::core::default::Default for DSOP_FILTER_FLAGS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for DSOP_FILTER_FLAGS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSOP_FILTER_FLAGS").field("Uplevel", &self.Uplevel).field("flDownlevel", &self.flDownlevel).finish() } } impl ::core::cmp::PartialEq for DSOP_FILTER_FLAGS { fn eq(&self, other: &Self) -> bool { self.Uplevel == other.Uplevel && self.flDownlevel == other.flDownlevel } } impl ::core::cmp::Eq for DSOP_FILTER_FLAGS {} unsafe impl ::windows::core::Abi for DSOP_FILTER_FLAGS { type Abi = Self; } pub const DSOP_FILTER_GLOBAL_GROUPS_DL: u32 = 64u32; pub const DSOP_FILTER_GLOBAL_GROUPS_SE: u32 = 128u32; pub const DSOP_FILTER_INCLUDE_ADVANCED_VIEW: u32 = 1u32; pub const DSOP_FILTER_PASSWORDSETTINGS_OBJECTS: u32 = 8192u32; pub const DSOP_FILTER_SERVICE_ACCOUNTS: u32 = 4096u32; pub const DSOP_FILTER_UNIVERSAL_GROUPS_DL: u32 = 16u32; pub const DSOP_FILTER_UNIVERSAL_GROUPS_SE: u32 = 32u32; pub const DSOP_FILTER_USERS: u32 = 2u32; pub const DSOP_FILTER_WELL_KNOWN_PRINCIPALS: u32 = 8u32; pub const DSOP_FLAG_MULTISELECT: u32 = 1u32; pub const DSOP_FLAG_SKIP_TARGET_COMPUTER_DC_CHECK: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DSOP_INIT_INFO { pub cbSize: u32, pub pwzTargetComputer: super::super::Foundation::PWSTR, pub cDsScopeInfos: u32, pub aDsScopeInfos: *mut DSOP_SCOPE_INIT_INFO, pub flOptions: u32, pub cAttributesToFetch: u32, pub apwzAttributeNames: *mut super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl DSOP_INIT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DSOP_INIT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DSOP_INIT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSOP_INIT_INFO") .field("cbSize", &self.cbSize) .field("pwzTargetComputer", &self.pwzTargetComputer) .field("cDsScopeInfos", &self.cDsScopeInfos) .field("aDsScopeInfos", &self.aDsScopeInfos) .field("flOptions", &self.flOptions) .field("cAttributesToFetch", &self.cAttributesToFetch) .field("apwzAttributeNames", &self.apwzAttributeNames) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DSOP_INIT_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pwzTargetComputer == other.pwzTargetComputer && self.cDsScopeInfos == other.cDsScopeInfos && self.aDsScopeInfos == other.aDsScopeInfos && self.flOptions == other.flOptions && self.cAttributesToFetch == other.cAttributesToFetch && self.apwzAttributeNames == other.apwzAttributeNames } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DSOP_INIT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DSOP_INIT_INFO { type Abi = Self; } pub const DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS: u32 = 256u32; pub const DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS: u32 = 512u32; pub const DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS: u32 = 128u32; pub const DSOP_SCOPE_FLAG_DEFAULT_FILTER_PASSWORDSETTINGS_OBJECTS: u32 = 2048u32; pub const DSOP_SCOPE_FLAG_DEFAULT_FILTER_SERVICE_ACCOUNTS: u32 = 1024u32; pub const DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS: u32 = 64u32; pub const DSOP_SCOPE_FLAG_STARTING_SCOPE: u32 = 1u32; pub const DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH: u32 = 32u32; pub const DSOP_SCOPE_FLAG_WANT_PROVIDER_GC: u32 = 8u32; pub const DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP: u32 = 4u32; pub const DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT: u32 = 2u32; pub const DSOP_SCOPE_FLAG_WANT_SID_PATH: u32 = 16u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DSOP_SCOPE_INIT_INFO { pub cbSize: u32, pub flType: u32, pub flScope: u32, pub FilterFlags: DSOP_FILTER_FLAGS, pub pwzDcName: super::super::Foundation::PWSTR, pub pwzADsPath: super::super::Foundation::PWSTR, pub hr: ::windows::core::HRESULT, } #[cfg(feature = "Win32_Foundation")] impl DSOP_SCOPE_INIT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DSOP_SCOPE_INIT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DSOP_SCOPE_INIT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSOP_SCOPE_INIT_INFO").field("cbSize", &self.cbSize).field("flType", &self.flType).field("flScope", &self.flScope).field("FilterFlags", &self.FilterFlags).field("pwzDcName", &self.pwzDcName).field("pwzADsPath", &self.pwzADsPath).field("hr", &self.hr).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DSOP_SCOPE_INIT_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.flType == other.flType && self.flScope == other.flScope && self.FilterFlags == other.FilterFlags && self.pwzDcName == other.pwzDcName && self.pwzADsPath == other.pwzADsPath && self.hr == other.hr } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DSOP_SCOPE_INIT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DSOP_SCOPE_INIT_INFO { type Abi = Self; } pub const DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN: u32 = 4u32; pub const DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN: u32 = 8u32; pub const DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN: u32 = 64u32; pub const DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN: u32 = 32u32; pub const DSOP_SCOPE_TYPE_GLOBAL_CATALOG: u32 = 16u32; pub const DSOP_SCOPE_TYPE_TARGET_COMPUTER: u32 = 1u32; pub const DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN: u32 = 2u32; pub const DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE: u32 = 512u32; pub const DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE: u32 = 256u32; pub const DSOP_SCOPE_TYPE_WORKGROUP: u32 = 128u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct DSOP_UPLEVEL_FILTER_FLAGS { pub flBothModes: u32, pub flMixedModeOnly: u32, pub flNativeModeOnly: u32, } impl DSOP_UPLEVEL_FILTER_FLAGS {} impl ::core::default::Default for DSOP_UPLEVEL_FILTER_FLAGS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for DSOP_UPLEVEL_FILTER_FLAGS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSOP_UPLEVEL_FILTER_FLAGS").field("flBothModes", &self.flBothModes).field("flMixedModeOnly", &self.flMixedModeOnly).field("flNativeModeOnly", &self.flNativeModeOnly).finish() } } impl ::core::cmp::PartialEq for DSOP_UPLEVEL_FILTER_FLAGS { fn eq(&self, other: &Self) -> bool { self.flBothModes == other.flBothModes && self.flMixedModeOnly == other.flMixedModeOnly && self.flNativeModeOnly == other.flNativeModeOnly } } impl ::core::cmp::Eq for DSOP_UPLEVEL_FILTER_FLAGS {} unsafe impl ::windows::core::Abi for DSOP_UPLEVEL_FILTER_FLAGS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct DSPROPERTYPAGEINFO { pub offsetString: u32, } impl DSPROPERTYPAGEINFO {} impl ::core::default::Default for DSPROPERTYPAGEINFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for DSPROPERTYPAGEINFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSPROPERTYPAGEINFO").field("offsetString", &self.offsetString).finish() } } impl ::core::cmp::PartialEq for DSPROPERTYPAGEINFO { fn eq(&self, other: &Self) -> bool { self.offsetString == other.offsetString } } impl ::core::cmp::Eq for DSPROPERTYPAGEINFO {} unsafe impl ::windows::core::Abi for DSPROPERTYPAGEINFO { type Abi = Self; } pub const DSPROVIDER_ADVANCED: u32 = 16u32; pub const DSPROVIDER_AD_LDS: u32 = 32u32; pub const DSPROVIDER_UNUSED_0: u32 = 1u32; pub const DSPROVIDER_UNUSED_1: u32 = 2u32; pub const DSPROVIDER_UNUSED_2: u32 = 4u32; pub const DSPROVIDER_UNUSED_3: u32 = 8u32; pub const DSQPF_ENABLEADMINFEATURES: u32 = 8u32; pub const DSQPF_ENABLEADVANCEDFEATURES: u32 = 16u32; pub const DSQPF_HASCREDENTIALS: u32 = 32u32; pub const DSQPF_NOCHOOSECOLUMNS: u32 = 64u32; pub const DSQPF_NOSAVE: u32 = 1u32; pub const DSQPF_SAVELOCATION: u32 = 2u32; pub const DSQPF_SHOWHIDDENOBJECTS: u32 = 4u32; pub const DSQPM_GETCLASSLIST: u32 = 268435456u32; pub const DSQPM_HELPTOPICS: u32 = 268435457u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct DSQUERYCLASSLIST { pub cbStruct: u32, pub cClasses: i32, pub offsetClass: [u32; 1], } impl DSQUERYCLASSLIST {} impl ::core::default::Default for DSQUERYCLASSLIST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for DSQUERYCLASSLIST { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSQUERYCLASSLIST").field("cbStruct", &self.cbStruct).field("cClasses", &self.cClasses).field("offsetClass", &self.offsetClass).finish() } } impl ::core::cmp::PartialEq for DSQUERYCLASSLIST { fn eq(&self, other: &Self) -> bool { self.cbStruct == other.cbStruct && self.cClasses == other.cClasses && self.offsetClass == other.offsetClass } } impl ::core::cmp::Eq for DSQUERYCLASSLIST {} unsafe impl ::windows::core::Abi for DSQUERYCLASSLIST { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DSQUERYINITPARAMS { pub cbStruct: u32, pub dwFlags: u32, pub pDefaultScope: super::super::Foundation::PWSTR, pub pDefaultSaveLocation: super::super::Foundation::PWSTR, pub pUserName: super::super::Foundation::PWSTR, pub pPassword: super::super::Foundation::PWSTR, pub pServer: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl DSQUERYINITPARAMS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DSQUERYINITPARAMS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DSQUERYINITPARAMS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSQUERYINITPARAMS") .field("cbStruct", &self.cbStruct) .field("dwFlags", &self.dwFlags) .field("pDefaultScope", &self.pDefaultScope) .field("pDefaultSaveLocation", &self.pDefaultSaveLocation) .field("pUserName", &self.pUserName) .field("pPassword", &self.pPassword) .field("pServer", &self.pServer) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DSQUERYINITPARAMS { fn eq(&self, other: &Self) -> bool { self.cbStruct == other.cbStruct && self.dwFlags == other.dwFlags && self.pDefaultScope == other.pDefaultScope && self.pDefaultSaveLocation == other.pDefaultSaveLocation && self.pUserName == other.pUserName && self.pPassword == other.pPassword && self.pServer == other.pServer } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DSQUERYINITPARAMS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DSQUERYINITPARAMS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DSQUERYPARAMS { pub cbStruct: u32, pub dwFlags: u32, pub hInstance: super::super::Foundation::HINSTANCE, pub offsetQuery: i32, pub iColumns: i32, pub dwReserved: u32, pub aColumns: [DSCOLUMN; 1], } #[cfg(feature = "Win32_Foundation")] impl DSQUERYPARAMS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DSQUERYPARAMS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DSQUERYPARAMS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSQUERYPARAMS").field("cbStruct", &self.cbStruct).field("dwFlags", &self.dwFlags).field("hInstance", &self.hInstance).field("offsetQuery", &self.offsetQuery).field("iColumns", &self.iColumns).field("dwReserved", &self.dwReserved).field("aColumns", &self.aColumns).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DSQUERYPARAMS { fn eq(&self, other: &Self) -> bool { self.cbStruct == other.cbStruct && self.dwFlags == other.dwFlags && self.hInstance == other.hInstance && self.offsetQuery == other.offsetQuery && self.iColumns == other.iColumns && self.dwReserved == other.dwReserved && self.aColumns == other.aColumns } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DSQUERYPARAMS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DSQUERYPARAMS { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct DSROLE_MACHINE_ROLE(pub i32); pub const DsRole_RoleStandaloneWorkstation: DSROLE_MACHINE_ROLE = DSROLE_MACHINE_ROLE(0i32); pub const DsRole_RoleMemberWorkstation: DSROLE_MACHINE_ROLE = DSROLE_MACHINE_ROLE(1i32); pub const DsRole_RoleStandaloneServer: DSROLE_MACHINE_ROLE = DSROLE_MACHINE_ROLE(2i32); pub const DsRole_RoleMemberServer: DSROLE_MACHINE_ROLE = DSROLE_MACHINE_ROLE(3i32); pub const DsRole_RoleBackupDomainController: DSROLE_MACHINE_ROLE = DSROLE_MACHINE_ROLE(4i32); pub const DsRole_RolePrimaryDomainController: DSROLE_MACHINE_ROLE = DSROLE_MACHINE_ROLE(5i32); impl ::core::convert::From<i32> for DSROLE_MACHINE_ROLE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for DSROLE_MACHINE_ROLE { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct DSROLE_OPERATION_STATE(pub i32); pub const DsRoleOperationIdle: DSROLE_OPERATION_STATE = DSROLE_OPERATION_STATE(0i32); pub const DsRoleOperationActive: DSROLE_OPERATION_STATE = DSROLE_OPERATION_STATE(1i32); pub const DsRoleOperationNeedReboot: DSROLE_OPERATION_STATE = DSROLE_OPERATION_STATE(2i32); impl ::core::convert::From<i32> for DSROLE_OPERATION_STATE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for DSROLE_OPERATION_STATE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct DSROLE_OPERATION_STATE_INFO { pub OperationState: DSROLE_OPERATION_STATE, } impl DSROLE_OPERATION_STATE_INFO {} impl ::core::default::Default for DSROLE_OPERATION_STATE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for DSROLE_OPERATION_STATE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSROLE_OPERATION_STATE_INFO").field("OperationState", &self.OperationState).finish() } } impl ::core::cmp::PartialEq for DSROLE_OPERATION_STATE_INFO { fn eq(&self, other: &Self) -> bool { self.OperationState == other.OperationState } } impl ::core::cmp::Eq for DSROLE_OPERATION_STATE_INFO {} unsafe impl ::windows::core::Abi for DSROLE_OPERATION_STATE_INFO { type Abi = Self; } pub const DSROLE_PRIMARY_DOMAIN_GUID_PRESENT: u32 = 16777216u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DSROLE_PRIMARY_DOMAIN_INFO_BASIC { pub MachineRole: DSROLE_MACHINE_ROLE, pub Flags: u32, pub DomainNameFlat: super::super::Foundation::PWSTR, pub DomainNameDns: super::super::Foundation::PWSTR, pub DomainForestName: super::super::Foundation::PWSTR, pub DomainGuid: ::windows::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl DSROLE_PRIMARY_DOMAIN_INFO_BASIC {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DSROLE_PRIMARY_DOMAIN_INFO_BASIC { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DSROLE_PRIMARY_DOMAIN_INFO_BASIC { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSROLE_PRIMARY_DOMAIN_INFO_BASIC") .field("MachineRole", &self.MachineRole) .field("Flags", &self.Flags) .field("DomainNameFlat", &self.DomainNameFlat) .field("DomainNameDns", &self.DomainNameDns) .field("DomainForestName", &self.DomainForestName) .field("DomainGuid", &self.DomainGuid) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DSROLE_PRIMARY_DOMAIN_INFO_BASIC { fn eq(&self, other: &Self) -> bool { self.MachineRole == other.MachineRole && self.Flags == other.Flags && self.DomainNameFlat == other.DomainNameFlat && self.DomainNameDns == other.DomainNameDns && self.DomainForestName == other.DomainForestName && self.DomainGuid == other.DomainGuid } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DSROLE_PRIMARY_DOMAIN_INFO_BASIC {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DSROLE_PRIMARY_DOMAIN_INFO_BASIC { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct DSROLE_PRIMARY_DOMAIN_INFO_LEVEL(pub i32); pub const DsRolePrimaryDomainInfoBasic: DSROLE_PRIMARY_DOMAIN_INFO_LEVEL = DSROLE_PRIMARY_DOMAIN_INFO_LEVEL(1i32); pub const DsRoleUpgradeStatus: DSROLE_PRIMARY_DOMAIN_INFO_LEVEL = DSROLE_PRIMARY_DOMAIN_INFO_LEVEL(2i32); pub const DsRoleOperationState: DSROLE_PRIMARY_DOMAIN_INFO_LEVEL = DSROLE_PRIMARY_DOMAIN_INFO_LEVEL(3i32); impl ::core::convert::From<i32> for DSROLE_PRIMARY_DOMAIN_INFO_LEVEL { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for DSROLE_PRIMARY_DOMAIN_INFO_LEVEL { type Abi = Self; } pub const DSROLE_PRIMARY_DS_MIXED_MODE: u32 = 2u32; pub const DSROLE_PRIMARY_DS_READONLY: u32 = 8u32; pub const DSROLE_PRIMARY_DS_RUNNING: u32 = 1u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct DSROLE_SERVER_STATE(pub i32); pub const DsRoleServerUnknown: DSROLE_SERVER_STATE = DSROLE_SERVER_STATE(0i32); pub const DsRoleServerPrimary: DSROLE_SERVER_STATE = DSROLE_SERVER_STATE(1i32); pub const DsRoleServerBackup: DSROLE_SERVER_STATE = DSROLE_SERVER_STATE(2i32); impl ::core::convert::From<i32> for DSROLE_SERVER_STATE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for DSROLE_SERVER_STATE { type Abi = Self; } pub const DSROLE_UPGRADE_IN_PROGRESS: u32 = 4u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct DSROLE_UPGRADE_STATUS_INFO { pub OperationState: u32, pub PreviousServerState: DSROLE_SERVER_STATE, } impl DSROLE_UPGRADE_STATUS_INFO {} impl ::core::default::Default for DSROLE_UPGRADE_STATUS_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for DSROLE_UPGRADE_STATUS_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSROLE_UPGRADE_STATUS_INFO").field("OperationState", &self.OperationState).field("PreviousServerState", &self.PreviousServerState).finish() } } impl ::core::cmp::PartialEq for DSROLE_UPGRADE_STATUS_INFO { fn eq(&self, other: &Self) -> bool { self.OperationState == other.OperationState && self.PreviousServerState == other.PreviousServerState } } impl ::core::cmp::Eq for DSROLE_UPGRADE_STATUS_INFO {} unsafe impl ::windows::core::Abi for DSROLE_UPGRADE_STATUS_INFO { type Abi = Self; } pub const DSSSF_DONTSIGNSEAL: u32 = 2u32; pub const DSSSF_DSAVAILABLE: u32 = 2147483648u32; pub const DSSSF_SIMPLEAUTHENTICATE: u32 = 1u32; pub const DS_AVOID_SELF: u32 = 16384u32; pub const DS_BACKGROUND_ONLY: u32 = 256u32; pub const DS_BEHAVIOR_LONGHORN: u32 = 3u32; pub const DS_BEHAVIOR_WIN2000: u32 = 0u32; pub const DS_BEHAVIOR_WIN2003: u32 = 2u32; pub const DS_BEHAVIOR_WIN2003_WITH_MIXED_DOMAINS: u32 = 1u32; pub const DS_BEHAVIOR_WIN2008: u32 = 3u32; pub const DS_BEHAVIOR_WIN2008R2: u32 = 4u32; pub const DS_BEHAVIOR_WIN2012: u32 = 5u32; pub const DS_BEHAVIOR_WIN2012R2: u32 = 6u32; pub const DS_BEHAVIOR_WIN2016: u32 = 7u32; pub const DS_BEHAVIOR_WIN7: u32 = 4u32; pub const DS_BEHAVIOR_WIN8: u32 = 5u32; pub const DS_BEHAVIOR_WINBLUE: u32 = 6u32; pub const DS_BEHAVIOR_WINTHRESHOLD: u32 = 7u32; pub const DS_CLOSEST_FLAG: u32 = 128u32; pub const DS_DIRECTORY_SERVICE_10_REQUIRED: u32 = 8388608u32; pub const DS_DIRECTORY_SERVICE_6_REQUIRED: u32 = 524288u32; pub const DS_DIRECTORY_SERVICE_8_REQUIRED: u32 = 2097152u32; pub const DS_DIRECTORY_SERVICE_9_REQUIRED: u32 = 4194304u32; pub const DS_DIRECTORY_SERVICE_PREFERRED: u32 = 32u32; pub const DS_DIRECTORY_SERVICE_REQUIRED: u32 = 16u32; pub const DS_DNS_CONTROLLER_FLAG: u32 = 536870912u32; pub const DS_DNS_DOMAIN_FLAG: u32 = 1073741824u32; pub const DS_DNS_FOREST_FLAG: u32 = 2147483648u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_DOMAIN_CONTROLLER_INFO_1A { pub NetbiosName: super::super::Foundation::PSTR, pub DnsHostName: super::super::Foundation::PSTR, pub SiteName: super::super::Foundation::PSTR, pub ComputerObjectName: super::super::Foundation::PSTR, pub ServerObjectName: super::super::Foundation::PSTR, pub fIsPdc: super::super::Foundation::BOOL, pub fDsEnabled: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl DS_DOMAIN_CONTROLLER_INFO_1A {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_DOMAIN_CONTROLLER_INFO_1A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_DOMAIN_CONTROLLER_INFO_1A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_DOMAIN_CONTROLLER_INFO_1A") .field("NetbiosName", &self.NetbiosName) .field("DnsHostName", &self.DnsHostName) .field("SiteName", &self.SiteName) .field("ComputerObjectName", &self.ComputerObjectName) .field("ServerObjectName", &self.ServerObjectName) .field("fIsPdc", &self.fIsPdc) .field("fDsEnabled", &self.fDsEnabled) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_DOMAIN_CONTROLLER_INFO_1A { fn eq(&self, other: &Self) -> bool { self.NetbiosName == other.NetbiosName && self.DnsHostName == other.DnsHostName && self.SiteName == other.SiteName && self.ComputerObjectName == other.ComputerObjectName && self.ServerObjectName == other.ServerObjectName && self.fIsPdc == other.fIsPdc && self.fDsEnabled == other.fDsEnabled } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_DOMAIN_CONTROLLER_INFO_1A {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_DOMAIN_CONTROLLER_INFO_1A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_DOMAIN_CONTROLLER_INFO_1W { pub NetbiosName: super::super::Foundation::PWSTR, pub DnsHostName: super::super::Foundation::PWSTR, pub SiteName: super::super::Foundation::PWSTR, pub ComputerObjectName: super::super::Foundation::PWSTR, pub ServerObjectName: super::super::Foundation::PWSTR, pub fIsPdc: super::super::Foundation::BOOL, pub fDsEnabled: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl DS_DOMAIN_CONTROLLER_INFO_1W {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_DOMAIN_CONTROLLER_INFO_1W { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_DOMAIN_CONTROLLER_INFO_1W { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_DOMAIN_CONTROLLER_INFO_1W") .field("NetbiosName", &self.NetbiosName) .field("DnsHostName", &self.DnsHostName) .field("SiteName", &self.SiteName) .field("ComputerObjectName", &self.ComputerObjectName) .field("ServerObjectName", &self.ServerObjectName) .field("fIsPdc", &self.fIsPdc) .field("fDsEnabled", &self.fDsEnabled) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_DOMAIN_CONTROLLER_INFO_1W { fn eq(&self, other: &Self) -> bool { self.NetbiosName == other.NetbiosName && self.DnsHostName == other.DnsHostName && self.SiteName == other.SiteName && self.ComputerObjectName == other.ComputerObjectName && self.ServerObjectName == other.ServerObjectName && self.fIsPdc == other.fIsPdc && self.fDsEnabled == other.fDsEnabled } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_DOMAIN_CONTROLLER_INFO_1W {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_DOMAIN_CONTROLLER_INFO_1W { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_DOMAIN_CONTROLLER_INFO_2A { pub NetbiosName: super::super::Foundation::PSTR, pub DnsHostName: super::super::Foundation::PSTR, pub SiteName: super::super::Foundation::PSTR, pub SiteObjectName: super::super::Foundation::PSTR, pub ComputerObjectName: super::super::Foundation::PSTR, pub ServerObjectName: super::super::Foundation::PSTR, pub NtdsDsaObjectName: super::super::Foundation::PSTR, pub fIsPdc: super::super::Foundation::BOOL, pub fDsEnabled: super::super::Foundation::BOOL, pub fIsGc: super::super::Foundation::BOOL, pub SiteObjectGuid: ::windows::core::GUID, pub ComputerObjectGuid: ::windows::core::GUID, pub ServerObjectGuid: ::windows::core::GUID, pub NtdsDsaObjectGuid: ::windows::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl DS_DOMAIN_CONTROLLER_INFO_2A {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_DOMAIN_CONTROLLER_INFO_2A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_DOMAIN_CONTROLLER_INFO_2A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_DOMAIN_CONTROLLER_INFO_2A") .field("NetbiosName", &self.NetbiosName) .field("DnsHostName", &self.DnsHostName) .field("SiteName", &self.SiteName) .field("SiteObjectName", &self.SiteObjectName) .field("ComputerObjectName", &self.ComputerObjectName) .field("ServerObjectName", &self.ServerObjectName) .field("NtdsDsaObjectName", &self.NtdsDsaObjectName) .field("fIsPdc", &self.fIsPdc) .field("fDsEnabled", &self.fDsEnabled) .field("fIsGc", &self.fIsGc) .field("SiteObjectGuid", &self.SiteObjectGuid) .field("ComputerObjectGuid", &self.ComputerObjectGuid) .field("ServerObjectGuid", &self.ServerObjectGuid) .field("NtdsDsaObjectGuid", &self.NtdsDsaObjectGuid) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_DOMAIN_CONTROLLER_INFO_2A { fn eq(&self, other: &Self) -> bool { self.NetbiosName == other.NetbiosName && self.DnsHostName == other.DnsHostName && self.SiteName == other.SiteName && self.SiteObjectName == other.SiteObjectName && self.ComputerObjectName == other.ComputerObjectName && self.ServerObjectName == other.ServerObjectName && self.NtdsDsaObjectName == other.NtdsDsaObjectName && self.fIsPdc == other.fIsPdc && self.fDsEnabled == other.fDsEnabled && self.fIsGc == other.fIsGc && self.SiteObjectGuid == other.SiteObjectGuid && self.ComputerObjectGuid == other.ComputerObjectGuid && self.ServerObjectGuid == other.ServerObjectGuid && self.NtdsDsaObjectGuid == other.NtdsDsaObjectGuid } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_DOMAIN_CONTROLLER_INFO_2A {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_DOMAIN_CONTROLLER_INFO_2A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_DOMAIN_CONTROLLER_INFO_2W { pub NetbiosName: super::super::Foundation::PWSTR, pub DnsHostName: super::super::Foundation::PWSTR, pub SiteName: super::super::Foundation::PWSTR, pub SiteObjectName: super::super::Foundation::PWSTR, pub ComputerObjectName: super::super::Foundation::PWSTR, pub ServerObjectName: super::super::Foundation::PWSTR, pub NtdsDsaObjectName: super::super::Foundation::PWSTR, pub fIsPdc: super::super::Foundation::BOOL, pub fDsEnabled: super::super::Foundation::BOOL, pub fIsGc: super::super::Foundation::BOOL, pub SiteObjectGuid: ::windows::core::GUID, pub ComputerObjectGuid: ::windows::core::GUID, pub ServerObjectGuid: ::windows::core::GUID, pub NtdsDsaObjectGuid: ::windows::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl DS_DOMAIN_CONTROLLER_INFO_2W {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_DOMAIN_CONTROLLER_INFO_2W { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_DOMAIN_CONTROLLER_INFO_2W { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_DOMAIN_CONTROLLER_INFO_2W") .field("NetbiosName", &self.NetbiosName) .field("DnsHostName", &self.DnsHostName) .field("SiteName", &self.SiteName) .field("SiteObjectName", &self.SiteObjectName) .field("ComputerObjectName", &self.ComputerObjectName) .field("ServerObjectName", &self.ServerObjectName) .field("NtdsDsaObjectName", &self.NtdsDsaObjectName) .field("fIsPdc", &self.fIsPdc) .field("fDsEnabled", &self.fDsEnabled) .field("fIsGc", &self.fIsGc) .field("SiteObjectGuid", &self.SiteObjectGuid) .field("ComputerObjectGuid", &self.ComputerObjectGuid) .field("ServerObjectGuid", &self.ServerObjectGuid) .field("NtdsDsaObjectGuid", &self.NtdsDsaObjectGuid) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_DOMAIN_CONTROLLER_INFO_2W { fn eq(&self, other: &Self) -> bool { self.NetbiosName == other.NetbiosName && self.DnsHostName == other.DnsHostName && self.SiteName == other.SiteName && self.SiteObjectName == other.SiteObjectName && self.ComputerObjectName == other.ComputerObjectName && self.ServerObjectName == other.ServerObjectName && self.NtdsDsaObjectName == other.NtdsDsaObjectName && self.fIsPdc == other.fIsPdc && self.fDsEnabled == other.fDsEnabled && self.fIsGc == other.fIsGc && self.SiteObjectGuid == other.SiteObjectGuid && self.ComputerObjectGuid == other.ComputerObjectGuid && self.ServerObjectGuid == other.ServerObjectGuid && self.NtdsDsaObjectGuid == other.NtdsDsaObjectGuid } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_DOMAIN_CONTROLLER_INFO_2W {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_DOMAIN_CONTROLLER_INFO_2W { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_DOMAIN_CONTROLLER_INFO_3A { pub NetbiosName: super::super::Foundation::PSTR, pub DnsHostName: super::super::Foundation::PSTR, pub SiteName: super::super::Foundation::PSTR, pub SiteObjectName: super::super::Foundation::PSTR, pub ComputerObjectName: super::super::Foundation::PSTR, pub ServerObjectName: super::super::Foundation::PSTR, pub NtdsDsaObjectName: super::super::Foundation::PSTR, pub fIsPdc: super::super::Foundation::BOOL, pub fDsEnabled: super::super::Foundation::BOOL, pub fIsGc: super::super::Foundation::BOOL, pub fIsRodc: super::super::Foundation::BOOL, pub SiteObjectGuid: ::windows::core::GUID, pub ComputerObjectGuid: ::windows::core::GUID, pub ServerObjectGuid: ::windows::core::GUID, pub NtdsDsaObjectGuid: ::windows::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl DS_DOMAIN_CONTROLLER_INFO_3A {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_DOMAIN_CONTROLLER_INFO_3A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_DOMAIN_CONTROLLER_INFO_3A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_DOMAIN_CONTROLLER_INFO_3A") .field("NetbiosName", &self.NetbiosName) .field("DnsHostName", &self.DnsHostName) .field("SiteName", &self.SiteName) .field("SiteObjectName", &self.SiteObjectName) .field("ComputerObjectName", &self.ComputerObjectName) .field("ServerObjectName", &self.ServerObjectName) .field("NtdsDsaObjectName", &self.NtdsDsaObjectName) .field("fIsPdc", &self.fIsPdc) .field("fDsEnabled", &self.fDsEnabled) .field("fIsGc", &self.fIsGc) .field("fIsRodc", &self.fIsRodc) .field("SiteObjectGuid", &self.SiteObjectGuid) .field("ComputerObjectGuid", &self.ComputerObjectGuid) .field("ServerObjectGuid", &self.ServerObjectGuid) .field("NtdsDsaObjectGuid", &self.NtdsDsaObjectGuid) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_DOMAIN_CONTROLLER_INFO_3A { fn eq(&self, other: &Self) -> bool { self.NetbiosName == other.NetbiosName && self.DnsHostName == other.DnsHostName && self.SiteName == other.SiteName && self.SiteObjectName == other.SiteObjectName && self.ComputerObjectName == other.ComputerObjectName && self.ServerObjectName == other.ServerObjectName && self.NtdsDsaObjectName == other.NtdsDsaObjectName && self.fIsPdc == other.fIsPdc && self.fDsEnabled == other.fDsEnabled && self.fIsGc == other.fIsGc && self.fIsRodc == other.fIsRodc && self.SiteObjectGuid == other.SiteObjectGuid && self.ComputerObjectGuid == other.ComputerObjectGuid && self.ServerObjectGuid == other.ServerObjectGuid && self.NtdsDsaObjectGuid == other.NtdsDsaObjectGuid } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_DOMAIN_CONTROLLER_INFO_3A {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_DOMAIN_CONTROLLER_INFO_3A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_DOMAIN_CONTROLLER_INFO_3W { pub NetbiosName: super::super::Foundation::PWSTR, pub DnsHostName: super::super::Foundation::PWSTR, pub SiteName: super::super::Foundation::PWSTR, pub SiteObjectName: super::super::Foundation::PWSTR, pub ComputerObjectName: super::super::Foundation::PWSTR, pub ServerObjectName: super::super::Foundation::PWSTR, pub NtdsDsaObjectName: super::super::Foundation::PWSTR, pub fIsPdc: super::super::Foundation::BOOL, pub fDsEnabled: super::super::Foundation::BOOL, pub fIsGc: super::super::Foundation::BOOL, pub fIsRodc: super::super::Foundation::BOOL, pub SiteObjectGuid: ::windows::core::GUID, pub ComputerObjectGuid: ::windows::core::GUID, pub ServerObjectGuid: ::windows::core::GUID, pub NtdsDsaObjectGuid: ::windows::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl DS_DOMAIN_CONTROLLER_INFO_3W {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_DOMAIN_CONTROLLER_INFO_3W { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_DOMAIN_CONTROLLER_INFO_3W { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_DOMAIN_CONTROLLER_INFO_3W") .field("NetbiosName", &self.NetbiosName) .field("DnsHostName", &self.DnsHostName) .field("SiteName", &self.SiteName) .field("SiteObjectName", &self.SiteObjectName) .field("ComputerObjectName", &self.ComputerObjectName) .field("ServerObjectName", &self.ServerObjectName) .field("NtdsDsaObjectName", &self.NtdsDsaObjectName) .field("fIsPdc", &self.fIsPdc) .field("fDsEnabled", &self.fDsEnabled) .field("fIsGc", &self.fIsGc) .field("fIsRodc", &self.fIsRodc) .field("SiteObjectGuid", &self.SiteObjectGuid) .field("ComputerObjectGuid", &self.ComputerObjectGuid) .field("ServerObjectGuid", &self.ServerObjectGuid) .field("NtdsDsaObjectGuid", &self.NtdsDsaObjectGuid) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_DOMAIN_CONTROLLER_INFO_3W { fn eq(&self, other: &Self) -> bool { self.NetbiosName == other.NetbiosName && self.DnsHostName == other.DnsHostName && self.SiteName == other.SiteName && self.SiteObjectName == other.SiteObjectName && self.ComputerObjectName == other.ComputerObjectName && self.ServerObjectName == other.ServerObjectName && self.NtdsDsaObjectName == other.NtdsDsaObjectName && self.fIsPdc == other.fIsPdc && self.fDsEnabled == other.fDsEnabled && self.fIsGc == other.fIsGc && self.fIsRodc == other.fIsRodc && self.SiteObjectGuid == other.SiteObjectGuid && self.ComputerObjectGuid == other.ComputerObjectGuid && self.ServerObjectGuid == other.ServerObjectGuid && self.NtdsDsaObjectGuid == other.NtdsDsaObjectGuid } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_DOMAIN_CONTROLLER_INFO_3W {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_DOMAIN_CONTROLLER_INFO_3W { type Abi = Self; } pub const DS_DOMAIN_DIRECT_INBOUND: u32 = 32u32; pub const DS_DOMAIN_DIRECT_OUTBOUND: u32 = 2u32; pub const DS_DOMAIN_IN_FOREST: u32 = 1u32; pub const DS_DOMAIN_NATIVE_MODE: u32 = 16u32; pub const DS_DOMAIN_PRIMARY: u32 = 8u32; pub const DS_DOMAIN_TREE_ROOT: u32 = 4u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_DOMAIN_TRUSTSA { pub NetbiosDomainName: super::super::Foundation::PSTR, pub DnsDomainName: super::super::Foundation::PSTR, pub Flags: u32, pub ParentIndex: u32, pub TrustType: u32, pub TrustAttributes: u32, pub DomainSid: super::super::Foundation::PSID, pub DomainGuid: ::windows::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl DS_DOMAIN_TRUSTSA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_DOMAIN_TRUSTSA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_DOMAIN_TRUSTSA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_DOMAIN_TRUSTSA") .field("NetbiosDomainName", &self.NetbiosDomainName) .field("DnsDomainName", &self.DnsDomainName) .field("Flags", &self.Flags) .field("ParentIndex", &self.ParentIndex) .field("TrustType", &self.TrustType) .field("TrustAttributes", &self.TrustAttributes) .field("DomainSid", &self.DomainSid) .field("DomainGuid", &self.DomainGuid) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_DOMAIN_TRUSTSA { fn eq(&self, other: &Self) -> bool { self.NetbiosDomainName == other.NetbiosDomainName && self.DnsDomainName == other.DnsDomainName && self.Flags == other.Flags && self.ParentIndex == other.ParentIndex && self.TrustType == other.TrustType && self.TrustAttributes == other.TrustAttributes && self.DomainSid == other.DomainSid && self.DomainGuid == other.DomainGuid } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_DOMAIN_TRUSTSA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_DOMAIN_TRUSTSA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_DOMAIN_TRUSTSW { pub NetbiosDomainName: super::super::Foundation::PWSTR, pub DnsDomainName: super::super::Foundation::PWSTR, pub Flags: u32, pub ParentIndex: u32, pub TrustType: u32, pub TrustAttributes: u32, pub DomainSid: super::super::Foundation::PSID, pub DomainGuid: ::windows::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl DS_DOMAIN_TRUSTSW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_DOMAIN_TRUSTSW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_DOMAIN_TRUSTSW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_DOMAIN_TRUSTSW") .field("NetbiosDomainName", &self.NetbiosDomainName) .field("DnsDomainName", &self.DnsDomainName) .field("Flags", &self.Flags) .field("ParentIndex", &self.ParentIndex) .field("TrustType", &self.TrustType) .field("TrustAttributes", &self.TrustAttributes) .field("DomainSid", &self.DomainSid) .field("DomainGuid", &self.DomainGuid) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_DOMAIN_TRUSTSW { fn eq(&self, other: &Self) -> bool { self.NetbiosDomainName == other.NetbiosDomainName && self.DnsDomainName == other.DnsDomainName && self.Flags == other.Flags && self.ParentIndex == other.ParentIndex && self.TrustType == other.TrustType && self.TrustAttributes == other.TrustAttributes && self.DomainSid == other.DomainSid && self.DomainGuid == other.DomainGuid } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_DOMAIN_TRUSTSW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_DOMAIN_TRUSTSW { type Abi = Self; } pub const DS_DS_10_FLAG: u32 = 65536u32; pub const DS_DS_8_FLAG: u32 = 16384u32; pub const DS_DS_9_FLAG: u32 = 32768u32; pub const DS_DS_FLAG: u32 = 16u32; pub const DS_EXIST_ADVISORY_MODE: u32 = 1u32; pub const DS_FORCE_REDISCOVERY: u32 = 1u32; pub const DS_FULL_SECRET_DOMAIN_6_FLAG: u32 = 4096u32; pub const DS_GC_FLAG: u32 = 4u32; pub const DS_GC_SERVER_REQUIRED: u32 = 64u32; pub const DS_GFTI_UPDATE_TDO: u32 = 1u32; pub const DS_GFTI_VALID_FLAGS: u32 = 1u32; pub const DS_GOOD_TIMESERV_FLAG: u32 = 512u32; pub const DS_GOOD_TIMESERV_PREFERRED: u32 = 8192u32; pub const DS_INSTANCETYPE_IS_NC_HEAD: u32 = 1u32; pub const DS_INSTANCETYPE_NC_COMING: u32 = 16u32; pub const DS_INSTANCETYPE_NC_GOING: u32 = 32u32; pub const DS_INSTANCETYPE_NC_IS_WRITEABLE: u32 = 4u32; pub const DS_IP_REQUIRED: u32 = 512u32; pub const DS_IS_DNS_NAME: u32 = 131072u32; pub const DS_IS_FLAT_NAME: u32 = 65536u32; pub const DS_KCC_FLAG_ASYNC_OP: u32 = 1u32; pub const DS_KCC_FLAG_DAMPED: u32 = 2u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct DS_KCC_TASKID(pub i32); pub const DS_KCC_TASKID_UPDATE_TOPOLOGY: DS_KCC_TASKID = DS_KCC_TASKID(0i32); impl ::core::convert::From<i32> for DS_KCC_TASKID { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for DS_KCC_TASKID { type Abi = Self; } pub const DS_KDC_FLAG: u32 = 32u32; pub const DS_KDC_REQUIRED: u32 = 1024u32; pub const DS_KEY_LIST_FLAG: u32 = 131072u32; pub const DS_KEY_LIST_SUPPORT_REQUIRED: u32 = 16777216u32; pub const DS_LDAP_FLAG: u32 = 8u32; pub const DS_LIST_ACCOUNT_OBJECT_FOR_SERVER: u32 = 2u32; pub const DS_LIST_DNS_HOST_NAME_FOR_SERVER: u32 = 1u32; pub const DS_LIST_DSA_OBJECT_FOR_SERVER: u32 = 0u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct DS_MANGLE_FOR(pub i32); pub const DS_MANGLE_UNKNOWN: DS_MANGLE_FOR = DS_MANGLE_FOR(0i32); pub const DS_MANGLE_OBJECT_RDN_FOR_DELETION: DS_MANGLE_FOR = DS_MANGLE_FOR(1i32); pub const DS_MANGLE_OBJECT_RDN_FOR_NAME_CONFLICT: DS_MANGLE_FOR = DS_MANGLE_FOR(2i32); impl ::core::convert::From<i32> for DS_MANGLE_FOR { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for DS_MANGLE_FOR { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct DS_NAME_ERROR(pub i32); pub const DS_NAME_NO_ERROR: DS_NAME_ERROR = DS_NAME_ERROR(0i32); pub const DS_NAME_ERROR_RESOLVING: DS_NAME_ERROR = DS_NAME_ERROR(1i32); pub const DS_NAME_ERROR_NOT_FOUND: DS_NAME_ERROR = DS_NAME_ERROR(2i32); pub const DS_NAME_ERROR_NOT_UNIQUE: DS_NAME_ERROR = DS_NAME_ERROR(3i32); pub const DS_NAME_ERROR_NO_MAPPING: DS_NAME_ERROR = DS_NAME_ERROR(4i32); pub const DS_NAME_ERROR_DOMAIN_ONLY: DS_NAME_ERROR = DS_NAME_ERROR(5i32); pub const DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING: DS_NAME_ERROR = DS_NAME_ERROR(6i32); pub const DS_NAME_ERROR_TRUST_REFERRAL: DS_NAME_ERROR = DS_NAME_ERROR(7i32); impl ::core::convert::From<i32> for DS_NAME_ERROR { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for DS_NAME_ERROR { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct DS_NAME_FLAGS(pub i32); pub const DS_NAME_NO_FLAGS: DS_NAME_FLAGS = DS_NAME_FLAGS(0i32); pub const DS_NAME_FLAG_SYNTACTICAL_ONLY: DS_NAME_FLAGS = DS_NAME_FLAGS(1i32); pub const DS_NAME_FLAG_EVAL_AT_DC: DS_NAME_FLAGS = DS_NAME_FLAGS(2i32); pub const DS_NAME_FLAG_GCVERIFY: DS_NAME_FLAGS = DS_NAME_FLAGS(4i32); pub const DS_NAME_FLAG_TRUST_REFERRAL: DS_NAME_FLAGS = DS_NAME_FLAGS(8i32); impl ::core::convert::From<i32> for DS_NAME_FLAGS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for DS_NAME_FLAGS { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct DS_NAME_FORMAT(pub i32); pub const DS_UNKNOWN_NAME: DS_NAME_FORMAT = DS_NAME_FORMAT(0i32); pub const DS_FQDN_1779_NAME: DS_NAME_FORMAT = DS_NAME_FORMAT(1i32); pub const DS_NT4_ACCOUNT_NAME: DS_NAME_FORMAT = DS_NAME_FORMAT(2i32); pub const DS_DISPLAY_NAME: DS_NAME_FORMAT = DS_NAME_FORMAT(3i32); pub const DS_UNIQUE_ID_NAME: DS_NAME_FORMAT = DS_NAME_FORMAT(6i32); pub const DS_CANONICAL_NAME: DS_NAME_FORMAT = DS_NAME_FORMAT(7i32); pub const DS_USER_PRINCIPAL_NAME: DS_NAME_FORMAT = DS_NAME_FORMAT(8i32); pub const DS_CANONICAL_NAME_EX: DS_NAME_FORMAT = DS_NAME_FORMAT(9i32); pub const DS_SERVICE_PRINCIPAL_NAME: DS_NAME_FORMAT = DS_NAME_FORMAT(10i32); pub const DS_SID_OR_SID_HISTORY_NAME: DS_NAME_FORMAT = DS_NAME_FORMAT(11i32); pub const DS_DNS_DOMAIN_NAME: DS_NAME_FORMAT = DS_NAME_FORMAT(12i32); impl ::core::convert::From<i32> for DS_NAME_FORMAT { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for DS_NAME_FORMAT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_NAME_RESULTA { pub cItems: u32, pub rItems: *mut DS_NAME_RESULT_ITEMA, } #[cfg(feature = "Win32_Foundation")] impl DS_NAME_RESULTA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_NAME_RESULTA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_NAME_RESULTA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_NAME_RESULTA").field("cItems", &self.cItems).field("rItems", &self.rItems).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_NAME_RESULTA { fn eq(&self, other: &Self) -> bool { self.cItems == other.cItems && self.rItems == other.rItems } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_NAME_RESULTA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_NAME_RESULTA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_NAME_RESULTW { pub cItems: u32, pub rItems: *mut DS_NAME_RESULT_ITEMW, } #[cfg(feature = "Win32_Foundation")] impl DS_NAME_RESULTW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_NAME_RESULTW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_NAME_RESULTW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_NAME_RESULTW").field("cItems", &self.cItems).field("rItems", &self.rItems).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_NAME_RESULTW { fn eq(&self, other: &Self) -> bool { self.cItems == other.cItems && self.rItems == other.rItems } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_NAME_RESULTW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_NAME_RESULTW { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_NAME_RESULT_ITEMA { pub status: u32, pub pDomain: super::super::Foundation::PSTR, pub pName: super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl DS_NAME_RESULT_ITEMA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_NAME_RESULT_ITEMA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_NAME_RESULT_ITEMA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_NAME_RESULT_ITEMA").field("status", &self.status).field("pDomain", &self.pDomain).field("pName", &self.pName).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_NAME_RESULT_ITEMA { fn eq(&self, other: &Self) -> bool { self.status == other.status && self.pDomain == other.pDomain && self.pName == other.pName } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_NAME_RESULT_ITEMA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_NAME_RESULT_ITEMA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_NAME_RESULT_ITEMW { pub status: u32, pub pDomain: super::super::Foundation::PWSTR, pub pName: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl DS_NAME_RESULT_ITEMW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_NAME_RESULT_ITEMW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_NAME_RESULT_ITEMW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_NAME_RESULT_ITEMW").field("status", &self.status).field("pDomain", &self.pDomain).field("pName", &self.pName).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_NAME_RESULT_ITEMW { fn eq(&self, other: &Self) -> bool { self.status == other.status && self.pDomain == other.pDomain && self.pName == other.pName } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_NAME_RESULT_ITEMW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_NAME_RESULT_ITEMW { type Abi = Self; } pub const DS_NDNC_FLAG: u32 = 1024u32; pub const DS_NOTIFY_AFTER_SITE_RECORDS: u32 = 2u32; pub const DS_ONLY_DO_SITE_NAME: u32 = 1u32; pub const DS_ONLY_LDAP_NEEDED: u32 = 32768u32; pub const DS_PDC_FLAG: u32 = 1u32; pub const DS_PDC_REQUIRED: u32 = 128u32; pub const DS_PING_FLAGS: u32 = 1048575u32; pub const DS_REPADD_ASYNCHRONOUS_OPERATION: u32 = 1u32; pub const DS_REPADD_ASYNCHRONOUS_REPLICA: u32 = 32u32; pub const DS_REPADD_CRITICAL: u32 = 2048u32; pub const DS_REPADD_DISABLE_NOTIFICATION: u32 = 64u32; pub const DS_REPADD_DISABLE_PERIODIC: u32 = 128u32; pub const DS_REPADD_INITIAL: u32 = 4u32; pub const DS_REPADD_INTERSITE_MESSAGING: u32 = 16u32; pub const DS_REPADD_NEVER_NOTIFY: u32 = 512u32; pub const DS_REPADD_NONGC_RO_REPLICA: u32 = 16777216u32; pub const DS_REPADD_PERIODIC: u32 = 8u32; pub const DS_REPADD_SELECT_SECRETS: u32 = 4096u32; pub const DS_REPADD_TWO_WAY: u32 = 1024u32; pub const DS_REPADD_USE_COMPRESSION: u32 = 256u32; pub const DS_REPADD_WRITEABLE: u32 = 2u32; pub const DS_REPDEL_ASYNCHRONOUS_OPERATION: u32 = 1u32; pub const DS_REPDEL_IGNORE_ERRORS: u32 = 8u32; pub const DS_REPDEL_INTERSITE_MESSAGING: u32 = 4u32; pub const DS_REPDEL_LOCAL_ONLY: u32 = 16u32; pub const DS_REPDEL_NO_SOURCE: u32 = 32u32; pub const DS_REPDEL_REF_OK: u32 = 64u32; pub const DS_REPDEL_WRITEABLE: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_ATTR_META_DATA { pub pszAttributeName: super::super::Foundation::PWSTR, pub dwVersion: u32, pub ftimeLastOriginatingChange: super::super::Foundation::FILETIME, pub uuidLastOriginatingDsaInvocationID: ::windows::core::GUID, pub usnOriginatingChange: i64, pub usnLocalChange: i64, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_ATTR_META_DATA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_ATTR_META_DATA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_ATTR_META_DATA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_ATTR_META_DATA") .field("pszAttributeName", &self.pszAttributeName) .field("dwVersion", &self.dwVersion) .field("ftimeLastOriginatingChange", &self.ftimeLastOriginatingChange) .field("uuidLastOriginatingDsaInvocationID", &self.uuidLastOriginatingDsaInvocationID) .field("usnOriginatingChange", &self.usnOriginatingChange) .field("usnLocalChange", &self.usnLocalChange) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_ATTR_META_DATA { fn eq(&self, other: &Self) -> bool { self.pszAttributeName == other.pszAttributeName && self.dwVersion == other.dwVersion && self.ftimeLastOriginatingChange == other.ftimeLastOriginatingChange && self.uuidLastOriginatingDsaInvocationID == other.uuidLastOriginatingDsaInvocationID && self.usnOriginatingChange == other.usnOriginatingChange && self.usnLocalChange == other.usnLocalChange } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_ATTR_META_DATA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_ATTR_META_DATA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_ATTR_META_DATA_2 { pub pszAttributeName: super::super::Foundation::PWSTR, pub dwVersion: u32, pub ftimeLastOriginatingChange: super::super::Foundation::FILETIME, pub uuidLastOriginatingDsaInvocationID: ::windows::core::GUID, pub usnOriginatingChange: i64, pub usnLocalChange: i64, pub pszLastOriginatingDsaDN: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_ATTR_META_DATA_2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_ATTR_META_DATA_2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_ATTR_META_DATA_2 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_ATTR_META_DATA_2") .field("pszAttributeName", &self.pszAttributeName) .field("dwVersion", &self.dwVersion) .field("ftimeLastOriginatingChange", &self.ftimeLastOriginatingChange) .field("uuidLastOriginatingDsaInvocationID", &self.uuidLastOriginatingDsaInvocationID) .field("usnOriginatingChange", &self.usnOriginatingChange) .field("usnLocalChange", &self.usnLocalChange) .field("pszLastOriginatingDsaDN", &self.pszLastOriginatingDsaDN) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_ATTR_META_DATA_2 { fn eq(&self, other: &Self) -> bool { self.pszAttributeName == other.pszAttributeName && self.dwVersion == other.dwVersion && self.ftimeLastOriginatingChange == other.ftimeLastOriginatingChange && self.uuidLastOriginatingDsaInvocationID == other.uuidLastOriginatingDsaInvocationID && self.usnOriginatingChange == other.usnOriginatingChange && self.usnLocalChange == other.usnLocalChange && self.pszLastOriginatingDsaDN == other.pszLastOriginatingDsaDN } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_ATTR_META_DATA_2 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_ATTR_META_DATA_2 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_ATTR_META_DATA_BLOB { pub oszAttributeName: u32, pub dwVersion: u32, pub ftimeLastOriginatingChange: super::super::Foundation::FILETIME, pub uuidLastOriginatingDsaInvocationID: ::windows::core::GUID, pub usnOriginatingChange: i64, pub usnLocalChange: i64, pub oszLastOriginatingDsaDN: u32, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_ATTR_META_DATA_BLOB {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_ATTR_META_DATA_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_ATTR_META_DATA_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_ATTR_META_DATA_BLOB") .field("oszAttributeName", &self.oszAttributeName) .field("dwVersion", &self.dwVersion) .field("ftimeLastOriginatingChange", &self.ftimeLastOriginatingChange) .field("uuidLastOriginatingDsaInvocationID", &self.uuidLastOriginatingDsaInvocationID) .field("usnOriginatingChange", &self.usnOriginatingChange) .field("usnLocalChange", &self.usnLocalChange) .field("oszLastOriginatingDsaDN", &self.oszLastOriginatingDsaDN) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_ATTR_META_DATA_BLOB { fn eq(&self, other: &Self) -> bool { self.oszAttributeName == other.oszAttributeName && self.dwVersion == other.dwVersion && self.ftimeLastOriginatingChange == other.ftimeLastOriginatingChange && self.uuidLastOriginatingDsaInvocationID == other.uuidLastOriginatingDsaInvocationID && self.usnOriginatingChange == other.usnOriginatingChange && self.usnLocalChange == other.usnLocalChange && self.oszLastOriginatingDsaDN == other.oszLastOriginatingDsaDN } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_ATTR_META_DATA_BLOB {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_ATTR_META_DATA_BLOB { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_ATTR_VALUE_META_DATA { pub cNumEntries: u32, pub dwEnumerationContext: u32, pub rgMetaData: [DS_REPL_VALUE_META_DATA; 1], } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_ATTR_VALUE_META_DATA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_ATTR_VALUE_META_DATA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_ATTR_VALUE_META_DATA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_ATTR_VALUE_META_DATA").field("cNumEntries", &self.cNumEntries).field("dwEnumerationContext", &self.dwEnumerationContext).field("rgMetaData", &self.rgMetaData).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_ATTR_VALUE_META_DATA { fn eq(&self, other: &Self) -> bool { self.cNumEntries == other.cNumEntries && self.dwEnumerationContext == other.dwEnumerationContext && self.rgMetaData == other.rgMetaData } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_ATTR_VALUE_META_DATA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_ATTR_VALUE_META_DATA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_ATTR_VALUE_META_DATA_2 { pub cNumEntries: u32, pub dwEnumerationContext: u32, pub rgMetaData: [DS_REPL_VALUE_META_DATA_2; 1], } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_ATTR_VALUE_META_DATA_2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_ATTR_VALUE_META_DATA_2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_ATTR_VALUE_META_DATA_2 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_ATTR_VALUE_META_DATA_2").field("cNumEntries", &self.cNumEntries).field("dwEnumerationContext", &self.dwEnumerationContext).field("rgMetaData", &self.rgMetaData).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_ATTR_VALUE_META_DATA_2 { fn eq(&self, other: &Self) -> bool { self.cNumEntries == other.cNumEntries && self.dwEnumerationContext == other.dwEnumerationContext && self.rgMetaData == other.rgMetaData } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_ATTR_VALUE_META_DATA_2 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_ATTR_VALUE_META_DATA_2 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_ATTR_VALUE_META_DATA_EXT { pub cNumEntries: u32, pub dwEnumerationContext: u32, pub rgMetaData: [DS_REPL_VALUE_META_DATA_EXT; 1], } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_ATTR_VALUE_META_DATA_EXT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_ATTR_VALUE_META_DATA_EXT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_ATTR_VALUE_META_DATA_EXT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_ATTR_VALUE_META_DATA_EXT").field("cNumEntries", &self.cNumEntries).field("dwEnumerationContext", &self.dwEnumerationContext).field("rgMetaData", &self.rgMetaData).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_ATTR_VALUE_META_DATA_EXT { fn eq(&self, other: &Self) -> bool { self.cNumEntries == other.cNumEntries && self.dwEnumerationContext == other.dwEnumerationContext && self.rgMetaData == other.rgMetaData } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_ATTR_VALUE_META_DATA_EXT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_ATTR_VALUE_META_DATA_EXT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct DS_REPL_CURSOR { pub uuidSourceDsaInvocationID: ::windows::core::GUID, pub usnAttributeFilter: i64, } impl DS_REPL_CURSOR {} impl ::core::default::Default for DS_REPL_CURSOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for DS_REPL_CURSOR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_CURSOR").field("uuidSourceDsaInvocationID", &self.uuidSourceDsaInvocationID).field("usnAttributeFilter", &self.usnAttributeFilter).finish() } } impl ::core::cmp::PartialEq for DS_REPL_CURSOR { fn eq(&self, other: &Self) -> bool { self.uuidSourceDsaInvocationID == other.uuidSourceDsaInvocationID && self.usnAttributeFilter == other.usnAttributeFilter } } impl ::core::cmp::Eq for DS_REPL_CURSOR {} unsafe impl ::windows::core::Abi for DS_REPL_CURSOR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct DS_REPL_CURSORS { pub cNumCursors: u32, pub dwReserved: u32, pub rgCursor: [DS_REPL_CURSOR; 1], } impl DS_REPL_CURSORS {} impl ::core::default::Default for DS_REPL_CURSORS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for DS_REPL_CURSORS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_CURSORS").field("cNumCursors", &self.cNumCursors).field("dwReserved", &self.dwReserved).field("rgCursor", &self.rgCursor).finish() } } impl ::core::cmp::PartialEq for DS_REPL_CURSORS { fn eq(&self, other: &Self) -> bool { self.cNumCursors == other.cNumCursors && self.dwReserved == other.dwReserved && self.rgCursor == other.rgCursor } } impl ::core::cmp::Eq for DS_REPL_CURSORS {} unsafe impl ::windows::core::Abi for DS_REPL_CURSORS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_CURSORS_2 { pub cNumCursors: u32, pub dwEnumerationContext: u32, pub rgCursor: [DS_REPL_CURSOR_2; 1], } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_CURSORS_2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_CURSORS_2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_CURSORS_2 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_CURSORS_2").field("cNumCursors", &self.cNumCursors).field("dwEnumerationContext", &self.dwEnumerationContext).field("rgCursor", &self.rgCursor).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_CURSORS_2 { fn eq(&self, other: &Self) -> bool { self.cNumCursors == other.cNumCursors && self.dwEnumerationContext == other.dwEnumerationContext && self.rgCursor == other.rgCursor } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_CURSORS_2 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_CURSORS_2 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_CURSORS_3W { pub cNumCursors: u32, pub dwEnumerationContext: u32, pub rgCursor: [DS_REPL_CURSOR_3W; 1], } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_CURSORS_3W {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_CURSORS_3W { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_CURSORS_3W { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_CURSORS_3W").field("cNumCursors", &self.cNumCursors).field("dwEnumerationContext", &self.dwEnumerationContext).field("rgCursor", &self.rgCursor).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_CURSORS_3W { fn eq(&self, other: &Self) -> bool { self.cNumCursors == other.cNumCursors && self.dwEnumerationContext == other.dwEnumerationContext && self.rgCursor == other.rgCursor } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_CURSORS_3W {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_CURSORS_3W { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_CURSOR_2 { pub uuidSourceDsaInvocationID: ::windows::core::GUID, pub usnAttributeFilter: i64, pub ftimeLastSyncSuccess: super::super::Foundation::FILETIME, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_CURSOR_2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_CURSOR_2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_CURSOR_2 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_CURSOR_2").field("uuidSourceDsaInvocationID", &self.uuidSourceDsaInvocationID).field("usnAttributeFilter", &self.usnAttributeFilter).field("ftimeLastSyncSuccess", &self.ftimeLastSyncSuccess).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_CURSOR_2 { fn eq(&self, other: &Self) -> bool { self.uuidSourceDsaInvocationID == other.uuidSourceDsaInvocationID && self.usnAttributeFilter == other.usnAttributeFilter && self.ftimeLastSyncSuccess == other.ftimeLastSyncSuccess } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_CURSOR_2 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_CURSOR_2 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_CURSOR_3W { pub uuidSourceDsaInvocationID: ::windows::core::GUID, pub usnAttributeFilter: i64, pub ftimeLastSyncSuccess: super::super::Foundation::FILETIME, pub pszSourceDsaDN: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_CURSOR_3W {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_CURSOR_3W { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_CURSOR_3W { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_CURSOR_3W").field("uuidSourceDsaInvocationID", &self.uuidSourceDsaInvocationID).field("usnAttributeFilter", &self.usnAttributeFilter).field("ftimeLastSyncSuccess", &self.ftimeLastSyncSuccess).field("pszSourceDsaDN", &self.pszSourceDsaDN).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_CURSOR_3W { fn eq(&self, other: &Self) -> bool { self.uuidSourceDsaInvocationID == other.uuidSourceDsaInvocationID && self.usnAttributeFilter == other.usnAttributeFilter && self.ftimeLastSyncSuccess == other.ftimeLastSyncSuccess && self.pszSourceDsaDN == other.pszSourceDsaDN } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_CURSOR_3W {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_CURSOR_3W { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_CURSOR_BLOB { pub uuidSourceDsaInvocationID: ::windows::core::GUID, pub usnAttributeFilter: i64, pub ftimeLastSyncSuccess: super::super::Foundation::FILETIME, pub oszSourceDsaDN: u32, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_CURSOR_BLOB {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_CURSOR_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_CURSOR_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_CURSOR_BLOB").field("uuidSourceDsaInvocationID", &self.uuidSourceDsaInvocationID).field("usnAttributeFilter", &self.usnAttributeFilter).field("ftimeLastSyncSuccess", &self.ftimeLastSyncSuccess).field("oszSourceDsaDN", &self.oszSourceDsaDN).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_CURSOR_BLOB { fn eq(&self, other: &Self) -> bool { self.uuidSourceDsaInvocationID == other.uuidSourceDsaInvocationID && self.usnAttributeFilter == other.usnAttributeFilter && self.ftimeLastSyncSuccess == other.ftimeLastSyncSuccess && self.oszSourceDsaDN == other.oszSourceDsaDN } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_CURSOR_BLOB {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_CURSOR_BLOB { type Abi = Self; } pub const DS_REPL_INFO_FLAG_IMPROVE_LINKED_ATTRS: u32 = 1u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct DS_REPL_INFO_TYPE(pub i32); pub const DS_REPL_INFO_NEIGHBORS: DS_REPL_INFO_TYPE = DS_REPL_INFO_TYPE(0i32); pub const DS_REPL_INFO_CURSORS_FOR_NC: DS_REPL_INFO_TYPE = DS_REPL_INFO_TYPE(1i32); pub const DS_REPL_INFO_METADATA_FOR_OBJ: DS_REPL_INFO_TYPE = DS_REPL_INFO_TYPE(2i32); pub const DS_REPL_INFO_KCC_DSA_CONNECT_FAILURES: DS_REPL_INFO_TYPE = DS_REPL_INFO_TYPE(3i32); pub const DS_REPL_INFO_KCC_DSA_LINK_FAILURES: DS_REPL_INFO_TYPE = DS_REPL_INFO_TYPE(4i32); pub const DS_REPL_INFO_PENDING_OPS: DS_REPL_INFO_TYPE = DS_REPL_INFO_TYPE(5i32); pub const DS_REPL_INFO_METADATA_FOR_ATTR_VALUE: DS_REPL_INFO_TYPE = DS_REPL_INFO_TYPE(6i32); pub const DS_REPL_INFO_CURSORS_2_FOR_NC: DS_REPL_INFO_TYPE = DS_REPL_INFO_TYPE(7i32); pub const DS_REPL_INFO_CURSORS_3_FOR_NC: DS_REPL_INFO_TYPE = DS_REPL_INFO_TYPE(8i32); pub const DS_REPL_INFO_METADATA_2_FOR_OBJ: DS_REPL_INFO_TYPE = DS_REPL_INFO_TYPE(9i32); pub const DS_REPL_INFO_METADATA_2_FOR_ATTR_VALUE: DS_REPL_INFO_TYPE = DS_REPL_INFO_TYPE(10i32); pub const DS_REPL_INFO_METADATA_EXT_FOR_ATTR_VALUE: DS_REPL_INFO_TYPE = DS_REPL_INFO_TYPE(11i32); pub const DS_REPL_INFO_TYPE_MAX: DS_REPL_INFO_TYPE = DS_REPL_INFO_TYPE(12i32); impl ::core::convert::From<i32> for DS_REPL_INFO_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for DS_REPL_INFO_TYPE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_KCC_DSA_FAILURESW { pub cNumEntries: u32, pub dwReserved: u32, pub rgDsaFailure: [DS_REPL_KCC_DSA_FAILUREW; 1], } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_KCC_DSA_FAILURESW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_KCC_DSA_FAILURESW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_KCC_DSA_FAILURESW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_KCC_DSA_FAILURESW").field("cNumEntries", &self.cNumEntries).field("dwReserved", &self.dwReserved).field("rgDsaFailure", &self.rgDsaFailure).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_KCC_DSA_FAILURESW { fn eq(&self, other: &Self) -> bool { self.cNumEntries == other.cNumEntries && self.dwReserved == other.dwReserved && self.rgDsaFailure == other.rgDsaFailure } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_KCC_DSA_FAILURESW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_KCC_DSA_FAILURESW { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_KCC_DSA_FAILUREW { pub pszDsaDN: super::super::Foundation::PWSTR, pub uuidDsaObjGuid: ::windows::core::GUID, pub ftimeFirstFailure: super::super::Foundation::FILETIME, pub cNumFailures: u32, pub dwLastResult: u32, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_KCC_DSA_FAILUREW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_KCC_DSA_FAILUREW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_KCC_DSA_FAILUREW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_KCC_DSA_FAILUREW").field("pszDsaDN", &self.pszDsaDN).field("uuidDsaObjGuid", &self.uuidDsaObjGuid).field("ftimeFirstFailure", &self.ftimeFirstFailure).field("cNumFailures", &self.cNumFailures).field("dwLastResult", &self.dwLastResult).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_KCC_DSA_FAILUREW { fn eq(&self, other: &Self) -> bool { self.pszDsaDN == other.pszDsaDN && self.uuidDsaObjGuid == other.uuidDsaObjGuid && self.ftimeFirstFailure == other.ftimeFirstFailure && self.cNumFailures == other.cNumFailures && self.dwLastResult == other.dwLastResult } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_KCC_DSA_FAILUREW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_KCC_DSA_FAILUREW { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_KCC_DSA_FAILUREW_BLOB { pub oszDsaDN: u32, pub uuidDsaObjGuid: ::windows::core::GUID, pub ftimeFirstFailure: super::super::Foundation::FILETIME, pub cNumFailures: u32, pub dwLastResult: u32, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_KCC_DSA_FAILUREW_BLOB {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_KCC_DSA_FAILUREW_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_KCC_DSA_FAILUREW_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_KCC_DSA_FAILUREW_BLOB").field("oszDsaDN", &self.oszDsaDN).field("uuidDsaObjGuid", &self.uuidDsaObjGuid).field("ftimeFirstFailure", &self.ftimeFirstFailure).field("cNumFailures", &self.cNumFailures).field("dwLastResult", &self.dwLastResult).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_KCC_DSA_FAILUREW_BLOB { fn eq(&self, other: &Self) -> bool { self.oszDsaDN == other.oszDsaDN && self.uuidDsaObjGuid == other.uuidDsaObjGuid && self.ftimeFirstFailure == other.ftimeFirstFailure && self.cNumFailures == other.cNumFailures && self.dwLastResult == other.dwLastResult } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_KCC_DSA_FAILUREW_BLOB {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_KCC_DSA_FAILUREW_BLOB { type Abi = Self; } pub const DS_REPL_NBR_COMPRESS_CHANGES: u32 = 268435456u32; pub const DS_REPL_NBR_DISABLE_SCHEDULED_SYNC: u32 = 134217728u32; pub const DS_REPL_NBR_DO_SCHEDULED_SYNCS: u32 = 64u32; pub const DS_REPL_NBR_FULL_SYNC_IN_PROGRESS: u32 = 65536u32; pub const DS_REPL_NBR_FULL_SYNC_NEXT_PACKET: u32 = 131072u32; pub const DS_REPL_NBR_GCSPN: u32 = 1048576u32; pub const DS_REPL_NBR_IGNORE_CHANGE_NOTIFICATIONS: u32 = 67108864u32; pub const DS_REPL_NBR_NEVER_SYNCED: u32 = 2097152u32; pub const DS_REPL_NBR_NONGC_RO_REPLICA: u32 = 1024u32; pub const DS_REPL_NBR_NO_CHANGE_NOTIFICATIONS: u32 = 536870912u32; pub const DS_REPL_NBR_PARTIAL_ATTRIBUTE_SET: u32 = 1073741824u32; pub const DS_REPL_NBR_PREEMPTED: u32 = 16777216u32; pub const DS_REPL_NBR_RETURN_OBJECT_PARENTS: u32 = 2048u32; pub const DS_REPL_NBR_SELECT_SECRETS: u32 = 4096u32; pub const DS_REPL_NBR_SYNC_ON_STARTUP: u32 = 32u32; pub const DS_REPL_NBR_TWO_WAY_SYNC: u32 = 512u32; pub const DS_REPL_NBR_USE_ASYNC_INTERSITE_TRANSPORT: u32 = 128u32; pub const DS_REPL_NBR_WRITEABLE: u32 = 16u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_NEIGHBORSW { pub cNumNeighbors: u32, pub dwReserved: u32, pub rgNeighbor: [DS_REPL_NEIGHBORW; 1], } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_NEIGHBORSW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_NEIGHBORSW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_NEIGHBORSW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_NEIGHBORSW").field("cNumNeighbors", &self.cNumNeighbors).field("dwReserved", &self.dwReserved).field("rgNeighbor", &self.rgNeighbor).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_NEIGHBORSW { fn eq(&self, other: &Self) -> bool { self.cNumNeighbors == other.cNumNeighbors && self.dwReserved == other.dwReserved && self.rgNeighbor == other.rgNeighbor } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_NEIGHBORSW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_NEIGHBORSW { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_NEIGHBORW { pub pszNamingContext: super::super::Foundation::PWSTR, pub pszSourceDsaDN: super::super::Foundation::PWSTR, pub pszSourceDsaAddress: super::super::Foundation::PWSTR, pub pszAsyncIntersiteTransportDN: super::super::Foundation::PWSTR, pub dwReplicaFlags: u32, pub dwReserved: u32, pub uuidNamingContextObjGuid: ::windows::core::GUID, pub uuidSourceDsaObjGuid: ::windows::core::GUID, pub uuidSourceDsaInvocationID: ::windows::core::GUID, pub uuidAsyncIntersiteTransportObjGuid: ::windows::core::GUID, pub usnLastObjChangeSynced: i64, pub usnAttributeFilter: i64, pub ftimeLastSyncSuccess: super::super::Foundation::FILETIME, pub ftimeLastSyncAttempt: super::super::Foundation::FILETIME, pub dwLastSyncResult: u32, pub cNumConsecutiveSyncFailures: u32, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_NEIGHBORW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_NEIGHBORW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_NEIGHBORW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_NEIGHBORW") .field("pszNamingContext", &self.pszNamingContext) .field("pszSourceDsaDN", &self.pszSourceDsaDN) .field("pszSourceDsaAddress", &self.pszSourceDsaAddress) .field("pszAsyncIntersiteTransportDN", &self.pszAsyncIntersiteTransportDN) .field("dwReplicaFlags", &self.dwReplicaFlags) .field("dwReserved", &self.dwReserved) .field("uuidNamingContextObjGuid", &self.uuidNamingContextObjGuid) .field("uuidSourceDsaObjGuid", &self.uuidSourceDsaObjGuid) .field("uuidSourceDsaInvocationID", &self.uuidSourceDsaInvocationID) .field("uuidAsyncIntersiteTransportObjGuid", &self.uuidAsyncIntersiteTransportObjGuid) .field("usnLastObjChangeSynced", &self.usnLastObjChangeSynced) .field("usnAttributeFilter", &self.usnAttributeFilter) .field("ftimeLastSyncSuccess", &self.ftimeLastSyncSuccess) .field("ftimeLastSyncAttempt", &self.ftimeLastSyncAttempt) .field("dwLastSyncResult", &self.dwLastSyncResult) .field("cNumConsecutiveSyncFailures", &self.cNumConsecutiveSyncFailures) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_NEIGHBORW { fn eq(&self, other: &Self) -> bool { self.pszNamingContext == other.pszNamingContext && self.pszSourceDsaDN == other.pszSourceDsaDN && self.pszSourceDsaAddress == other.pszSourceDsaAddress && self.pszAsyncIntersiteTransportDN == other.pszAsyncIntersiteTransportDN && self.dwReplicaFlags == other.dwReplicaFlags && self.dwReserved == other.dwReserved && self.uuidNamingContextObjGuid == other.uuidNamingContextObjGuid && self.uuidSourceDsaObjGuid == other.uuidSourceDsaObjGuid && self.uuidSourceDsaInvocationID == other.uuidSourceDsaInvocationID && self.uuidAsyncIntersiteTransportObjGuid == other.uuidAsyncIntersiteTransportObjGuid && self.usnLastObjChangeSynced == other.usnLastObjChangeSynced && self.usnAttributeFilter == other.usnAttributeFilter && self.ftimeLastSyncSuccess == other.ftimeLastSyncSuccess && self.ftimeLastSyncAttempt == other.ftimeLastSyncAttempt && self.dwLastSyncResult == other.dwLastSyncResult && self.cNumConsecutiveSyncFailures == other.cNumConsecutiveSyncFailures } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_NEIGHBORW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_NEIGHBORW { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_NEIGHBORW_BLOB { pub oszNamingContext: u32, pub oszSourceDsaDN: u32, pub oszSourceDsaAddress: u32, pub oszAsyncIntersiteTransportDN: u32, pub dwReplicaFlags: u32, pub dwReserved: u32, pub uuidNamingContextObjGuid: ::windows::core::GUID, pub uuidSourceDsaObjGuid: ::windows::core::GUID, pub uuidSourceDsaInvocationID: ::windows::core::GUID, pub uuidAsyncIntersiteTransportObjGuid: ::windows::core::GUID, pub usnLastObjChangeSynced: i64, pub usnAttributeFilter: i64, pub ftimeLastSyncSuccess: super::super::Foundation::FILETIME, pub ftimeLastSyncAttempt: super::super::Foundation::FILETIME, pub dwLastSyncResult: u32, pub cNumConsecutiveSyncFailures: u32, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_NEIGHBORW_BLOB {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_NEIGHBORW_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_NEIGHBORW_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_NEIGHBORW_BLOB") .field("oszNamingContext", &self.oszNamingContext) .field("oszSourceDsaDN", &self.oszSourceDsaDN) .field("oszSourceDsaAddress", &self.oszSourceDsaAddress) .field("oszAsyncIntersiteTransportDN", &self.oszAsyncIntersiteTransportDN) .field("dwReplicaFlags", &self.dwReplicaFlags) .field("dwReserved", &self.dwReserved) .field("uuidNamingContextObjGuid", &self.uuidNamingContextObjGuid) .field("uuidSourceDsaObjGuid", &self.uuidSourceDsaObjGuid) .field("uuidSourceDsaInvocationID", &self.uuidSourceDsaInvocationID) .field("uuidAsyncIntersiteTransportObjGuid", &self.uuidAsyncIntersiteTransportObjGuid) .field("usnLastObjChangeSynced", &self.usnLastObjChangeSynced) .field("usnAttributeFilter", &self.usnAttributeFilter) .field("ftimeLastSyncSuccess", &self.ftimeLastSyncSuccess) .field("ftimeLastSyncAttempt", &self.ftimeLastSyncAttempt) .field("dwLastSyncResult", &self.dwLastSyncResult) .field("cNumConsecutiveSyncFailures", &self.cNumConsecutiveSyncFailures) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_NEIGHBORW_BLOB { fn eq(&self, other: &Self) -> bool { self.oszNamingContext == other.oszNamingContext && self.oszSourceDsaDN == other.oszSourceDsaDN && self.oszSourceDsaAddress == other.oszSourceDsaAddress && self.oszAsyncIntersiteTransportDN == other.oszAsyncIntersiteTransportDN && self.dwReplicaFlags == other.dwReplicaFlags && self.dwReserved == other.dwReserved && self.uuidNamingContextObjGuid == other.uuidNamingContextObjGuid && self.uuidSourceDsaObjGuid == other.uuidSourceDsaObjGuid && self.uuidSourceDsaInvocationID == other.uuidSourceDsaInvocationID && self.uuidAsyncIntersiteTransportObjGuid == other.uuidAsyncIntersiteTransportObjGuid && self.usnLastObjChangeSynced == other.usnLastObjChangeSynced && self.usnAttributeFilter == other.usnAttributeFilter && self.ftimeLastSyncSuccess == other.ftimeLastSyncSuccess && self.ftimeLastSyncAttempt == other.ftimeLastSyncAttempt && self.dwLastSyncResult == other.dwLastSyncResult && self.cNumConsecutiveSyncFailures == other.cNumConsecutiveSyncFailures } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_NEIGHBORW_BLOB {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_NEIGHBORW_BLOB { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_OBJ_META_DATA { pub cNumEntries: u32, pub dwReserved: u32, pub rgMetaData: [DS_REPL_ATTR_META_DATA; 1], } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_OBJ_META_DATA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_OBJ_META_DATA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_OBJ_META_DATA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_OBJ_META_DATA").field("cNumEntries", &self.cNumEntries).field("dwReserved", &self.dwReserved).field("rgMetaData", &self.rgMetaData).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_OBJ_META_DATA { fn eq(&self, other: &Self) -> bool { self.cNumEntries == other.cNumEntries && self.dwReserved == other.dwReserved && self.rgMetaData == other.rgMetaData } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_OBJ_META_DATA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_OBJ_META_DATA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_OBJ_META_DATA_2 { pub cNumEntries: u32, pub dwReserved: u32, pub rgMetaData: [DS_REPL_ATTR_META_DATA_2; 1], } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_OBJ_META_DATA_2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_OBJ_META_DATA_2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_OBJ_META_DATA_2 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_OBJ_META_DATA_2").field("cNumEntries", &self.cNumEntries).field("dwReserved", &self.dwReserved).field("rgMetaData", &self.rgMetaData).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_OBJ_META_DATA_2 { fn eq(&self, other: &Self) -> bool { self.cNumEntries == other.cNumEntries && self.dwReserved == other.dwReserved && self.rgMetaData == other.rgMetaData } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_OBJ_META_DATA_2 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_OBJ_META_DATA_2 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_OPW { pub ftimeEnqueued: super::super::Foundation::FILETIME, pub ulSerialNumber: u32, pub ulPriority: u32, pub OpType: DS_REPL_OP_TYPE, pub ulOptions: u32, pub pszNamingContext: super::super::Foundation::PWSTR, pub pszDsaDN: super::super::Foundation::PWSTR, pub pszDsaAddress: super::super::Foundation::PWSTR, pub uuidNamingContextObjGuid: ::windows::core::GUID, pub uuidDsaObjGuid: ::windows::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_OPW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_OPW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_OPW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_OPW") .field("ftimeEnqueued", &self.ftimeEnqueued) .field("ulSerialNumber", &self.ulSerialNumber) .field("ulPriority", &self.ulPriority) .field("OpType", &self.OpType) .field("ulOptions", &self.ulOptions) .field("pszNamingContext", &self.pszNamingContext) .field("pszDsaDN", &self.pszDsaDN) .field("pszDsaAddress", &self.pszDsaAddress) .field("uuidNamingContextObjGuid", &self.uuidNamingContextObjGuid) .field("uuidDsaObjGuid", &self.uuidDsaObjGuid) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_OPW { fn eq(&self, other: &Self) -> bool { self.ftimeEnqueued == other.ftimeEnqueued && self.ulSerialNumber == other.ulSerialNumber && self.ulPriority == other.ulPriority && self.OpType == other.OpType && self.ulOptions == other.ulOptions && self.pszNamingContext == other.pszNamingContext && self.pszDsaDN == other.pszDsaDN && self.pszDsaAddress == other.pszDsaAddress && self.uuidNamingContextObjGuid == other.uuidNamingContextObjGuid && self.uuidDsaObjGuid == other.uuidDsaObjGuid } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_OPW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_OPW { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_OPW_BLOB { pub ftimeEnqueued: super::super::Foundation::FILETIME, pub ulSerialNumber: u32, pub ulPriority: u32, pub OpType: DS_REPL_OP_TYPE, pub ulOptions: u32, pub oszNamingContext: u32, pub oszDsaDN: u32, pub oszDsaAddress: u32, pub uuidNamingContextObjGuid: ::windows::core::GUID, pub uuidDsaObjGuid: ::windows::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_OPW_BLOB {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_OPW_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_OPW_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_OPW_BLOB") .field("ftimeEnqueued", &self.ftimeEnqueued) .field("ulSerialNumber", &self.ulSerialNumber) .field("ulPriority", &self.ulPriority) .field("OpType", &self.OpType) .field("ulOptions", &self.ulOptions) .field("oszNamingContext", &self.oszNamingContext) .field("oszDsaDN", &self.oszDsaDN) .field("oszDsaAddress", &self.oszDsaAddress) .field("uuidNamingContextObjGuid", &self.uuidNamingContextObjGuid) .field("uuidDsaObjGuid", &self.uuidDsaObjGuid) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_OPW_BLOB { fn eq(&self, other: &Self) -> bool { self.ftimeEnqueued == other.ftimeEnqueued && self.ulSerialNumber == other.ulSerialNumber && self.ulPriority == other.ulPriority && self.OpType == other.OpType && self.ulOptions == other.ulOptions && self.oszNamingContext == other.oszNamingContext && self.oszDsaDN == other.oszDsaDN && self.oszDsaAddress == other.oszDsaAddress && self.uuidNamingContextObjGuid == other.uuidNamingContextObjGuid && self.uuidDsaObjGuid == other.uuidDsaObjGuid } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_OPW_BLOB {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_OPW_BLOB { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct DS_REPL_OP_TYPE(pub i32); pub const DS_REPL_OP_TYPE_SYNC: DS_REPL_OP_TYPE = DS_REPL_OP_TYPE(0i32); pub const DS_REPL_OP_TYPE_ADD: DS_REPL_OP_TYPE = DS_REPL_OP_TYPE(1i32); pub const DS_REPL_OP_TYPE_DELETE: DS_REPL_OP_TYPE = DS_REPL_OP_TYPE(2i32); pub const DS_REPL_OP_TYPE_MODIFY: DS_REPL_OP_TYPE = DS_REPL_OP_TYPE(3i32); pub const DS_REPL_OP_TYPE_UPDATE_REFS: DS_REPL_OP_TYPE = DS_REPL_OP_TYPE(4i32); impl ::core::convert::From<i32> for DS_REPL_OP_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for DS_REPL_OP_TYPE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_PENDING_OPSW { pub ftimeCurrentOpStarted: super::super::Foundation::FILETIME, pub cNumPendingOps: u32, pub rgPendingOp: [DS_REPL_OPW; 1], } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_PENDING_OPSW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_PENDING_OPSW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_PENDING_OPSW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_PENDING_OPSW").field("ftimeCurrentOpStarted", &self.ftimeCurrentOpStarted).field("cNumPendingOps", &self.cNumPendingOps).field("rgPendingOp", &self.rgPendingOp).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_PENDING_OPSW { fn eq(&self, other: &Self) -> bool { self.ftimeCurrentOpStarted == other.ftimeCurrentOpStarted && self.cNumPendingOps == other.cNumPendingOps && self.rgPendingOp == other.rgPendingOp } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_PENDING_OPSW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_PENDING_OPSW { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_QUEUE_STATISTICSW { pub ftimeCurrentOpStarted: super::super::Foundation::FILETIME, pub cNumPendingOps: u32, pub ftimeOldestSync: super::super::Foundation::FILETIME, pub ftimeOldestAdd: super::super::Foundation::FILETIME, pub ftimeOldestMod: super::super::Foundation::FILETIME, pub ftimeOldestDel: super::super::Foundation::FILETIME, pub ftimeOldestUpdRefs: super::super::Foundation::FILETIME, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_QUEUE_STATISTICSW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_QUEUE_STATISTICSW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_QUEUE_STATISTICSW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_QUEUE_STATISTICSW") .field("ftimeCurrentOpStarted", &self.ftimeCurrentOpStarted) .field("cNumPendingOps", &self.cNumPendingOps) .field("ftimeOldestSync", &self.ftimeOldestSync) .field("ftimeOldestAdd", &self.ftimeOldestAdd) .field("ftimeOldestMod", &self.ftimeOldestMod) .field("ftimeOldestDel", &self.ftimeOldestDel) .field("ftimeOldestUpdRefs", &self.ftimeOldestUpdRefs) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_QUEUE_STATISTICSW { fn eq(&self, other: &Self) -> bool { self.ftimeCurrentOpStarted == other.ftimeCurrentOpStarted && self.cNumPendingOps == other.cNumPendingOps && self.ftimeOldestSync == other.ftimeOldestSync && self.ftimeOldestAdd == other.ftimeOldestAdd && self.ftimeOldestMod == other.ftimeOldestMod && self.ftimeOldestDel == other.ftimeOldestDel && self.ftimeOldestUpdRefs == other.ftimeOldestUpdRefs } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_QUEUE_STATISTICSW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_QUEUE_STATISTICSW { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_VALUE_META_DATA { pub pszAttributeName: super::super::Foundation::PWSTR, pub pszObjectDn: super::super::Foundation::PWSTR, pub cbData: u32, pub pbData: *mut u8, pub ftimeDeleted: super::super::Foundation::FILETIME, pub ftimeCreated: super::super::Foundation::FILETIME, pub dwVersion: u32, pub ftimeLastOriginatingChange: super::super::Foundation::FILETIME, pub uuidLastOriginatingDsaInvocationID: ::windows::core::GUID, pub usnOriginatingChange: i64, pub usnLocalChange: i64, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_VALUE_META_DATA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_VALUE_META_DATA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_VALUE_META_DATA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_VALUE_META_DATA") .field("pszAttributeName", &self.pszAttributeName) .field("pszObjectDn", &self.pszObjectDn) .field("cbData", &self.cbData) .field("pbData", &self.pbData) .field("ftimeDeleted", &self.ftimeDeleted) .field("ftimeCreated", &self.ftimeCreated) .field("dwVersion", &self.dwVersion) .field("ftimeLastOriginatingChange", &self.ftimeLastOriginatingChange) .field("uuidLastOriginatingDsaInvocationID", &self.uuidLastOriginatingDsaInvocationID) .field("usnOriginatingChange", &self.usnOriginatingChange) .field("usnLocalChange", &self.usnLocalChange) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_VALUE_META_DATA { fn eq(&self, other: &Self) -> bool { self.pszAttributeName == other.pszAttributeName && self.pszObjectDn == other.pszObjectDn && self.cbData == other.cbData && self.pbData == other.pbData && self.ftimeDeleted == other.ftimeDeleted && self.ftimeCreated == other.ftimeCreated && self.dwVersion == other.dwVersion && self.ftimeLastOriginatingChange == other.ftimeLastOriginatingChange && self.uuidLastOriginatingDsaInvocationID == other.uuidLastOriginatingDsaInvocationID && self.usnOriginatingChange == other.usnOriginatingChange && self.usnLocalChange == other.usnLocalChange } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_VALUE_META_DATA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_VALUE_META_DATA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_VALUE_META_DATA_2 { pub pszAttributeName: super::super::Foundation::PWSTR, pub pszObjectDn: super::super::Foundation::PWSTR, pub cbData: u32, pub pbData: *mut u8, pub ftimeDeleted: super::super::Foundation::FILETIME, pub ftimeCreated: super::super::Foundation::FILETIME, pub dwVersion: u32, pub ftimeLastOriginatingChange: super::super::Foundation::FILETIME, pub uuidLastOriginatingDsaInvocationID: ::windows::core::GUID, pub usnOriginatingChange: i64, pub usnLocalChange: i64, pub pszLastOriginatingDsaDN: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_VALUE_META_DATA_2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_VALUE_META_DATA_2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_VALUE_META_DATA_2 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_VALUE_META_DATA_2") .field("pszAttributeName", &self.pszAttributeName) .field("pszObjectDn", &self.pszObjectDn) .field("cbData", &self.cbData) .field("pbData", &self.pbData) .field("ftimeDeleted", &self.ftimeDeleted) .field("ftimeCreated", &self.ftimeCreated) .field("dwVersion", &self.dwVersion) .field("ftimeLastOriginatingChange", &self.ftimeLastOriginatingChange) .field("uuidLastOriginatingDsaInvocationID", &self.uuidLastOriginatingDsaInvocationID) .field("usnOriginatingChange", &self.usnOriginatingChange) .field("usnLocalChange", &self.usnLocalChange) .field("pszLastOriginatingDsaDN", &self.pszLastOriginatingDsaDN) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_VALUE_META_DATA_2 { fn eq(&self, other: &Self) -> bool { self.pszAttributeName == other.pszAttributeName && self.pszObjectDn == other.pszObjectDn && self.cbData == other.cbData && self.pbData == other.pbData && self.ftimeDeleted == other.ftimeDeleted && self.ftimeCreated == other.ftimeCreated && self.dwVersion == other.dwVersion && self.ftimeLastOriginatingChange == other.ftimeLastOriginatingChange && self.uuidLastOriginatingDsaInvocationID == other.uuidLastOriginatingDsaInvocationID && self.usnOriginatingChange == other.usnOriginatingChange && self.usnLocalChange == other.usnLocalChange && self.pszLastOriginatingDsaDN == other.pszLastOriginatingDsaDN } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_VALUE_META_DATA_2 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_VALUE_META_DATA_2 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_VALUE_META_DATA_BLOB { pub oszAttributeName: u32, pub oszObjectDn: u32, pub cbData: u32, pub obData: u32, pub ftimeDeleted: super::super::Foundation::FILETIME, pub ftimeCreated: super::super::Foundation::FILETIME, pub dwVersion: u32, pub ftimeLastOriginatingChange: super::super::Foundation::FILETIME, pub uuidLastOriginatingDsaInvocationID: ::windows::core::GUID, pub usnOriginatingChange: i64, pub usnLocalChange: i64, pub oszLastOriginatingDsaDN: u32, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_VALUE_META_DATA_BLOB {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_VALUE_META_DATA_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_VALUE_META_DATA_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_VALUE_META_DATA_BLOB") .field("oszAttributeName", &self.oszAttributeName) .field("oszObjectDn", &self.oszObjectDn) .field("cbData", &self.cbData) .field("obData", &self.obData) .field("ftimeDeleted", &self.ftimeDeleted) .field("ftimeCreated", &self.ftimeCreated) .field("dwVersion", &self.dwVersion) .field("ftimeLastOriginatingChange", &self.ftimeLastOriginatingChange) .field("uuidLastOriginatingDsaInvocationID", &self.uuidLastOriginatingDsaInvocationID) .field("usnOriginatingChange", &self.usnOriginatingChange) .field("usnLocalChange", &self.usnLocalChange) .field("oszLastOriginatingDsaDN", &self.oszLastOriginatingDsaDN) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_VALUE_META_DATA_BLOB { fn eq(&self, other: &Self) -> bool { self.oszAttributeName == other.oszAttributeName && self.oszObjectDn == other.oszObjectDn && self.cbData == other.cbData && self.obData == other.obData && self.ftimeDeleted == other.ftimeDeleted && self.ftimeCreated == other.ftimeCreated && self.dwVersion == other.dwVersion && self.ftimeLastOriginatingChange == other.ftimeLastOriginatingChange && self.uuidLastOriginatingDsaInvocationID == other.uuidLastOriginatingDsaInvocationID && self.usnOriginatingChange == other.usnOriginatingChange && self.usnLocalChange == other.usnLocalChange && self.oszLastOriginatingDsaDN == other.oszLastOriginatingDsaDN } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_VALUE_META_DATA_BLOB {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_VALUE_META_DATA_BLOB { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_VALUE_META_DATA_BLOB_EXT { pub oszAttributeName: u32, pub oszObjectDn: u32, pub cbData: u32, pub obData: u32, pub ftimeDeleted: super::super::Foundation::FILETIME, pub ftimeCreated: super::super::Foundation::FILETIME, pub dwVersion: u32, pub ftimeLastOriginatingChange: super::super::Foundation::FILETIME, pub uuidLastOriginatingDsaInvocationID: ::windows::core::GUID, pub usnOriginatingChange: i64, pub usnLocalChange: i64, pub oszLastOriginatingDsaDN: u32, pub dwUserIdentifier: u32, pub dwPriorLinkState: u32, pub dwCurrentLinkState: u32, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_VALUE_META_DATA_BLOB_EXT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_VALUE_META_DATA_BLOB_EXT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_VALUE_META_DATA_BLOB_EXT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_VALUE_META_DATA_BLOB_EXT") .field("oszAttributeName", &self.oszAttributeName) .field("oszObjectDn", &self.oszObjectDn) .field("cbData", &self.cbData) .field("obData", &self.obData) .field("ftimeDeleted", &self.ftimeDeleted) .field("ftimeCreated", &self.ftimeCreated) .field("dwVersion", &self.dwVersion) .field("ftimeLastOriginatingChange", &self.ftimeLastOriginatingChange) .field("uuidLastOriginatingDsaInvocationID", &self.uuidLastOriginatingDsaInvocationID) .field("usnOriginatingChange", &self.usnOriginatingChange) .field("usnLocalChange", &self.usnLocalChange) .field("oszLastOriginatingDsaDN", &self.oszLastOriginatingDsaDN) .field("dwUserIdentifier", &self.dwUserIdentifier) .field("dwPriorLinkState", &self.dwPriorLinkState) .field("dwCurrentLinkState", &self.dwCurrentLinkState) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_VALUE_META_DATA_BLOB_EXT { fn eq(&self, other: &Self) -> bool { self.oszAttributeName == other.oszAttributeName && self.oszObjectDn == other.oszObjectDn && self.cbData == other.cbData && self.obData == other.obData && self.ftimeDeleted == other.ftimeDeleted && self.ftimeCreated == other.ftimeCreated && self.dwVersion == other.dwVersion && self.ftimeLastOriginatingChange == other.ftimeLastOriginatingChange && self.uuidLastOriginatingDsaInvocationID == other.uuidLastOriginatingDsaInvocationID && self.usnOriginatingChange == other.usnOriginatingChange && self.usnLocalChange == other.usnLocalChange && self.oszLastOriginatingDsaDN == other.oszLastOriginatingDsaDN && self.dwUserIdentifier == other.dwUserIdentifier && self.dwPriorLinkState == other.dwPriorLinkState && self.dwCurrentLinkState == other.dwCurrentLinkState } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_VALUE_META_DATA_BLOB_EXT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_VALUE_META_DATA_BLOB_EXT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_VALUE_META_DATA_EXT { pub pszAttributeName: super::super::Foundation::PWSTR, pub pszObjectDn: super::super::Foundation::PWSTR, pub cbData: u32, pub pbData: *mut u8, pub ftimeDeleted: super::super::Foundation::FILETIME, pub ftimeCreated: super::super::Foundation::FILETIME, pub dwVersion: u32, pub ftimeLastOriginatingChange: super::super::Foundation::FILETIME, pub uuidLastOriginatingDsaInvocationID: ::windows::core::GUID, pub usnOriginatingChange: i64, pub usnLocalChange: i64, pub pszLastOriginatingDsaDN: super::super::Foundation::PWSTR, pub dwUserIdentifier: u32, pub dwPriorLinkState: u32, pub dwCurrentLinkState: u32, } #[cfg(feature = "Win32_Foundation")] impl DS_REPL_VALUE_META_DATA_EXT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPL_VALUE_META_DATA_EXT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPL_VALUE_META_DATA_EXT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPL_VALUE_META_DATA_EXT") .field("pszAttributeName", &self.pszAttributeName) .field("pszObjectDn", &self.pszObjectDn) .field("cbData", &self.cbData) .field("pbData", &self.pbData) .field("ftimeDeleted", &self.ftimeDeleted) .field("ftimeCreated", &self.ftimeCreated) .field("dwVersion", &self.dwVersion) .field("ftimeLastOriginatingChange", &self.ftimeLastOriginatingChange) .field("uuidLastOriginatingDsaInvocationID", &self.uuidLastOriginatingDsaInvocationID) .field("usnOriginatingChange", &self.usnOriginatingChange) .field("usnLocalChange", &self.usnLocalChange) .field("pszLastOriginatingDsaDN", &self.pszLastOriginatingDsaDN) .field("dwUserIdentifier", &self.dwUserIdentifier) .field("dwPriorLinkState", &self.dwPriorLinkState) .field("dwCurrentLinkState", &self.dwCurrentLinkState) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPL_VALUE_META_DATA_EXT { fn eq(&self, other: &Self) -> bool { self.pszAttributeName == other.pszAttributeName && self.pszObjectDn == other.pszObjectDn && self.cbData == other.cbData && self.pbData == other.pbData && self.ftimeDeleted == other.ftimeDeleted && self.ftimeCreated == other.ftimeCreated && self.dwVersion == other.dwVersion && self.ftimeLastOriginatingChange == other.ftimeLastOriginatingChange && self.uuidLastOriginatingDsaInvocationID == other.uuidLastOriginatingDsaInvocationID && self.usnOriginatingChange == other.usnOriginatingChange && self.usnLocalChange == other.usnLocalChange && self.pszLastOriginatingDsaDN == other.pszLastOriginatingDsaDN && self.dwUserIdentifier == other.dwUserIdentifier && self.dwPriorLinkState == other.dwPriorLinkState && self.dwCurrentLinkState == other.dwCurrentLinkState } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPL_VALUE_META_DATA_EXT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPL_VALUE_META_DATA_EXT { type Abi = Self; } pub const DS_REPMOD_ASYNCHRONOUS_OPERATION: u32 = 1u32; pub const DS_REPMOD_UPDATE_ADDRESS: u32 = 2u32; pub const DS_REPMOD_UPDATE_FLAGS: u32 = 1u32; pub const DS_REPMOD_UPDATE_INSTANCE: u32 = 2u32; pub const DS_REPMOD_UPDATE_RESULT: u32 = 8u32; pub const DS_REPMOD_UPDATE_SCHEDULE: u32 = 4u32; pub const DS_REPMOD_UPDATE_TRANSPORT: u32 = 16u32; pub const DS_REPMOD_WRITEABLE: u32 = 2u32; pub const DS_REPSYNCALL_ABORT_IF_SERVER_UNAVAILABLE: u32 = 1u32; pub const DS_REPSYNCALL_CROSS_SITE_BOUNDARIES: u32 = 64u32; pub const DS_REPSYNCALL_DO_NOT_SYNC: u32 = 8u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPSYNCALL_ERRINFOA { pub pszSvrId: super::super::Foundation::PSTR, pub error: DS_REPSYNCALL_ERROR, pub dwWin32Err: u32, pub pszSrcId: super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl DS_REPSYNCALL_ERRINFOA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPSYNCALL_ERRINFOA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPSYNCALL_ERRINFOA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPSYNCALL_ERRINFOA").field("pszSvrId", &self.pszSvrId).field("error", &self.error).field("dwWin32Err", &self.dwWin32Err).field("pszSrcId", &self.pszSrcId).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPSYNCALL_ERRINFOA { fn eq(&self, other: &Self) -> bool { self.pszSvrId == other.pszSvrId && self.error == other.error && self.dwWin32Err == other.dwWin32Err && self.pszSrcId == other.pszSrcId } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPSYNCALL_ERRINFOA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPSYNCALL_ERRINFOA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPSYNCALL_ERRINFOW { pub pszSvrId: super::super::Foundation::PWSTR, pub error: DS_REPSYNCALL_ERROR, pub dwWin32Err: u32, pub pszSrcId: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl DS_REPSYNCALL_ERRINFOW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPSYNCALL_ERRINFOW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPSYNCALL_ERRINFOW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPSYNCALL_ERRINFOW").field("pszSvrId", &self.pszSvrId).field("error", &self.error).field("dwWin32Err", &self.dwWin32Err).field("pszSrcId", &self.pszSrcId).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPSYNCALL_ERRINFOW { fn eq(&self, other: &Self) -> bool { self.pszSvrId == other.pszSvrId && self.error == other.error && self.dwWin32Err == other.dwWin32Err && self.pszSrcId == other.pszSrcId } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPSYNCALL_ERRINFOW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPSYNCALL_ERRINFOW { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct DS_REPSYNCALL_ERROR(pub i32); pub const DS_REPSYNCALL_WIN32_ERROR_CONTACTING_SERVER: DS_REPSYNCALL_ERROR = DS_REPSYNCALL_ERROR(0i32); pub const DS_REPSYNCALL_WIN32_ERROR_REPLICATING: DS_REPSYNCALL_ERROR = DS_REPSYNCALL_ERROR(1i32); pub const DS_REPSYNCALL_SERVER_UNREACHABLE: DS_REPSYNCALL_ERROR = DS_REPSYNCALL_ERROR(2i32); impl ::core::convert::From<i32> for DS_REPSYNCALL_ERROR { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for DS_REPSYNCALL_ERROR { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct DS_REPSYNCALL_EVENT(pub i32); pub const DS_REPSYNCALL_EVENT_ERROR: DS_REPSYNCALL_EVENT = DS_REPSYNCALL_EVENT(0i32); pub const DS_REPSYNCALL_EVENT_SYNC_STARTED: DS_REPSYNCALL_EVENT = DS_REPSYNCALL_EVENT(1i32); pub const DS_REPSYNCALL_EVENT_SYNC_COMPLETED: DS_REPSYNCALL_EVENT = DS_REPSYNCALL_EVENT(2i32); pub const DS_REPSYNCALL_EVENT_FINISHED: DS_REPSYNCALL_EVENT = DS_REPSYNCALL_EVENT(3i32); impl ::core::convert::From<i32> for DS_REPSYNCALL_EVENT { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for DS_REPSYNCALL_EVENT { type Abi = Self; } pub const DS_REPSYNCALL_ID_SERVERS_BY_DN: u32 = 4u32; pub const DS_REPSYNCALL_NO_OPTIONS: u32 = 0u32; pub const DS_REPSYNCALL_PUSH_CHANGES_OUTWARD: u32 = 32u32; pub const DS_REPSYNCALL_SKIP_INITIAL_CHECK: u32 = 16u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPSYNCALL_SYNCA { pub pszSrcId: super::super::Foundation::PSTR, pub pszDstId: super::super::Foundation::PSTR, pub pszNC: super::super::Foundation::PSTR, pub pguidSrc: *mut ::windows::core::GUID, pub pguidDst: *mut ::windows::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl DS_REPSYNCALL_SYNCA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPSYNCALL_SYNCA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPSYNCALL_SYNCA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPSYNCALL_SYNCA").field("pszSrcId", &self.pszSrcId).field("pszDstId", &self.pszDstId).field("pszNC", &self.pszNC).field("pguidSrc", &self.pguidSrc).field("pguidDst", &self.pguidDst).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPSYNCALL_SYNCA { fn eq(&self, other: &Self) -> bool { self.pszSrcId == other.pszSrcId && self.pszDstId == other.pszDstId && self.pszNC == other.pszNC && self.pguidSrc == other.pguidSrc && self.pguidDst == other.pguidDst } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPSYNCALL_SYNCA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPSYNCALL_SYNCA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPSYNCALL_SYNCW { pub pszSrcId: super::super::Foundation::PWSTR, pub pszDstId: super::super::Foundation::PWSTR, pub pszNC: super::super::Foundation::PWSTR, pub pguidSrc: *mut ::windows::core::GUID, pub pguidDst: *mut ::windows::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl DS_REPSYNCALL_SYNCW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPSYNCALL_SYNCW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPSYNCALL_SYNCW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPSYNCALL_SYNCW").field("pszSrcId", &self.pszSrcId).field("pszDstId", &self.pszDstId).field("pszNC", &self.pszNC).field("pguidSrc", &self.pguidSrc).field("pguidDst", &self.pguidDst).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPSYNCALL_SYNCW { fn eq(&self, other: &Self) -> bool { self.pszSrcId == other.pszSrcId && self.pszDstId == other.pszDstId && self.pszNC == other.pszNC && self.pguidSrc == other.pguidSrc && self.pguidDst == other.pguidDst } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPSYNCALL_SYNCW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPSYNCALL_SYNCW { type Abi = Self; } pub const DS_REPSYNCALL_SYNC_ADJACENT_SERVERS_ONLY: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPSYNCALL_UPDATEA { pub event: DS_REPSYNCALL_EVENT, pub pErrInfo: *mut DS_REPSYNCALL_ERRINFOA, pub pSync: *mut DS_REPSYNCALL_SYNCA, } #[cfg(feature = "Win32_Foundation")] impl DS_REPSYNCALL_UPDATEA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPSYNCALL_UPDATEA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPSYNCALL_UPDATEA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPSYNCALL_UPDATEA").field("event", &self.event).field("pErrInfo", &self.pErrInfo).field("pSync", &self.pSync).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPSYNCALL_UPDATEA { fn eq(&self, other: &Self) -> bool { self.event == other.event && self.pErrInfo == other.pErrInfo && self.pSync == other.pSync } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPSYNCALL_UPDATEA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPSYNCALL_UPDATEA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPSYNCALL_UPDATEW { pub event: DS_REPSYNCALL_EVENT, pub pErrInfo: *mut DS_REPSYNCALL_ERRINFOW, pub pSync: *mut DS_REPSYNCALL_SYNCW, } #[cfg(feature = "Win32_Foundation")] impl DS_REPSYNCALL_UPDATEW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_REPSYNCALL_UPDATEW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_REPSYNCALL_UPDATEW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_REPSYNCALL_UPDATEW").field("event", &self.event).field("pErrInfo", &self.pErrInfo).field("pSync", &self.pSync).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_REPSYNCALL_UPDATEW { fn eq(&self, other: &Self) -> bool { self.event == other.event && self.pErrInfo == other.pErrInfo && self.pSync == other.pSync } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_REPSYNCALL_UPDATEW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_REPSYNCALL_UPDATEW { type Abi = Self; } pub const DS_REPSYNC_ABANDONED: u32 = 32768u32; pub const DS_REPSYNC_ADD_REFERENCE: u32 = 512u32; pub const DS_REPSYNC_ASYNCHRONOUS_OPERATION: u32 = 1u32; pub const DS_REPSYNC_ASYNCHRONOUS_REPLICA: u32 = 1048576u32; pub const DS_REPSYNC_CRITICAL: u32 = 2097152u32; pub const DS_REPSYNC_FORCE: u32 = 256u32; pub const DS_REPSYNC_FULL: u32 = 32u32; pub const DS_REPSYNC_FULL_IN_PROGRESS: u32 = 4194304u32; pub const DS_REPSYNC_INITIAL: u32 = 8192u32; pub const DS_REPSYNC_INITIAL_IN_PROGRESS: u32 = 65536u32; pub const DS_REPSYNC_INTERSITE_MESSAGING: u32 = 8u32; pub const DS_REPSYNC_NEVER_COMPLETED: u32 = 1024u32; pub const DS_REPSYNC_NEVER_NOTIFY: u32 = 4096u32; pub const DS_REPSYNC_NONGC_RO_REPLICA: u32 = 16777216u32; pub const DS_REPSYNC_NOTIFICATION: u32 = 524288u32; pub const DS_REPSYNC_NO_DISCARD: u32 = 128u32; pub const DS_REPSYNC_PARTIAL_ATTRIBUTE_SET: u32 = 131072u32; pub const DS_REPSYNC_PERIODIC: u32 = 4u32; pub const DS_REPSYNC_PREEMPTED: u32 = 8388608u32; pub const DS_REPSYNC_REQUEUE: u32 = 262144u32; pub const DS_REPSYNC_SELECT_SECRETS: u32 = 32768u32; pub const DS_REPSYNC_TWO_WAY: u32 = 2048u32; pub const DS_REPSYNC_URGENT: u32 = 64u32; pub const DS_REPSYNC_USE_COMPRESSION: u32 = 16384u32; pub const DS_REPSYNC_WRITEABLE: u32 = 2u32; pub const DS_REPUPD_ADD_REFERENCE: u32 = 4u32; pub const DS_REPUPD_ASYNCHRONOUS_OPERATION: u32 = 1u32; pub const DS_REPUPD_DELETE_REFERENCE: u32 = 8u32; pub const DS_REPUPD_REFERENCE_GCSPN: u32 = 16u32; pub const DS_REPUPD_WRITEABLE: u32 = 2u32; pub const DS_RETURN_DNS_NAME: u32 = 1073741824u32; pub const DS_RETURN_FLAT_NAME: u32 = 2147483648u32; pub const DS_ROLE_DOMAIN_OWNER: u32 = 1u32; pub const DS_ROLE_INFRASTRUCTURE_OWNER: u32 = 4u32; pub const DS_ROLE_PDC_OWNER: u32 = 2u32; pub const DS_ROLE_RID_OWNER: u32 = 3u32; pub const DS_ROLE_SCHEMA_OWNER: u32 = 0u32; pub const DS_SCHEMA_GUID_ATTR: u32 = 1u32; pub const DS_SCHEMA_GUID_ATTR_SET: u32 = 2u32; pub const DS_SCHEMA_GUID_CLASS: u32 = 3u32; pub const DS_SCHEMA_GUID_CONTROL_RIGHT: u32 = 4u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_SCHEMA_GUID_MAPA { pub guid: ::windows::core::GUID, pub guidType: u32, pub pName: super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl DS_SCHEMA_GUID_MAPA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_SCHEMA_GUID_MAPA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_SCHEMA_GUID_MAPA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_SCHEMA_GUID_MAPA").field("guid", &self.guid).field("guidType", &self.guidType).field("pName", &self.pName).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_SCHEMA_GUID_MAPA { fn eq(&self, other: &Self) -> bool { self.guid == other.guid && self.guidType == other.guidType && self.pName == other.pName } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_SCHEMA_GUID_MAPA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_SCHEMA_GUID_MAPA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DS_SCHEMA_GUID_MAPW { pub guid: ::windows::core::GUID, pub guidType: u32, pub pName: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl DS_SCHEMA_GUID_MAPW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for DS_SCHEMA_GUID_MAPW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for DS_SCHEMA_GUID_MAPW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_SCHEMA_GUID_MAPW").field("guid", &self.guid).field("guidType", &self.guidType).field("pName", &self.pName).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for DS_SCHEMA_GUID_MAPW { fn eq(&self, other: &Self) -> bool { self.guid == other.guid && self.guidType == other.guidType && self.pName == other.pName } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for DS_SCHEMA_GUID_MAPW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for DS_SCHEMA_GUID_MAPW { type Abi = Self; } pub const DS_SCHEMA_GUID_NOT_FOUND: u32 = 0u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub struct DS_SELECTION { pub pwzName: super::super::Foundation::PWSTR, pub pwzADsPath: super::super::Foundation::PWSTR, pub pwzClass: super::super::Foundation::PWSTR, pub pwzUPN: super::super::Foundation::PWSTR, pub pvarFetchedAttributes: *mut super::super::System::Com::VARIANT, pub flScopeType: u32, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] impl DS_SELECTION {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] impl ::core::default::Default for DS_SELECTION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] impl ::core::fmt::Debug for DS_SELECTION { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_SELECTION").field("pwzName", &self.pwzName).field("pwzADsPath", &self.pwzADsPath).field("pwzClass", &self.pwzClass).field("pwzUPN", &self.pwzUPN).field("pvarFetchedAttributes", &self.pvarFetchedAttributes).field("flScopeType", &self.flScopeType).finish() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] impl ::core::cmp::PartialEq for DS_SELECTION { fn eq(&self, other: &Self) -> bool { self.pwzName == other.pwzName && self.pwzADsPath == other.pwzADsPath && self.pwzClass == other.pwzClass && self.pwzUPN == other.pwzUPN && self.pvarFetchedAttributes == other.pvarFetchedAttributes && self.flScopeType == other.flScopeType } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] impl ::core::cmp::Eq for DS_SELECTION {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] unsafe impl ::windows::core::Abi for DS_SELECTION { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub struct DS_SELECTION_LIST { pub cItems: u32, pub cFetchedAttributes: u32, pub aDsSelection: [DS_SELECTION; 1], } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] impl DS_SELECTION_LIST {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] impl ::core::default::Default for DS_SELECTION_LIST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] impl ::core::fmt::Debug for DS_SELECTION_LIST { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_SELECTION_LIST").field("cItems", &self.cItems).field("cFetchedAttributes", &self.cFetchedAttributes).field("aDsSelection", &self.aDsSelection).finish() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] impl ::core::cmp::PartialEq for DS_SELECTION_LIST { fn eq(&self, other: &Self) -> bool { self.cItems == other.cItems && self.cFetchedAttributes == other.cFetchedAttributes && self.aDsSelection == other.aDsSelection } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] impl ::core::cmp::Eq for DS_SELECTION_LIST {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] unsafe impl ::windows::core::Abi for DS_SELECTION_LIST { type Abi = Self; } pub const DS_SELECT_SECRET_DOMAIN_6_FLAG: u32 = 2048u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct DS_SITE_COST_INFO { pub errorCode: u32, pub cost: u32, } impl DS_SITE_COST_INFO {} impl ::core::default::Default for DS_SITE_COST_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for DS_SITE_COST_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DS_SITE_COST_INFO").field("errorCode", &self.errorCode).field("cost", &self.cost).finish() } } impl ::core::cmp::PartialEq for DS_SITE_COST_INFO { fn eq(&self, other: &Self) -> bool { self.errorCode == other.errorCode && self.cost == other.cost } } impl ::core::cmp::Eq for DS_SITE_COST_INFO {} unsafe impl ::windows::core::Abi for DS_SITE_COST_INFO { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct DS_SPN_NAME_TYPE(pub i32); pub const DS_SPN_DNS_HOST: DS_SPN_NAME_TYPE = DS_SPN_NAME_TYPE(0i32); pub const DS_SPN_DN_HOST: DS_SPN_NAME_TYPE = DS_SPN_NAME_TYPE(1i32); pub const DS_SPN_NB_HOST: DS_SPN_NAME_TYPE = DS_SPN_NAME_TYPE(2i32); pub const DS_SPN_DOMAIN: DS_SPN_NAME_TYPE = DS_SPN_NAME_TYPE(3i32); pub const DS_SPN_NB_DOMAIN: DS_SPN_NAME_TYPE = DS_SPN_NAME_TYPE(4i32); pub const DS_SPN_SERVICE: DS_SPN_NAME_TYPE = DS_SPN_NAME_TYPE(5i32); impl ::core::convert::From<i32> for DS_SPN_NAME_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for DS_SPN_NAME_TYPE { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct DS_SPN_WRITE_OP(pub i32); pub const DS_SPN_ADD_SPN_OP: DS_SPN_WRITE_OP = DS_SPN_WRITE_OP(0i32); pub const DS_SPN_REPLACE_SPN_OP: DS_SPN_WRITE_OP = DS_SPN_WRITE_OP(1i32); pub const DS_SPN_DELETE_SPN_OP: DS_SPN_WRITE_OP = DS_SPN_WRITE_OP(2i32); impl ::core::convert::From<i32> for DS_SPN_WRITE_OP { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for DS_SPN_WRITE_OP { type Abi = Self; } pub const DS_TIMESERV_FLAG: u32 = 64u32; pub const DS_TIMESERV_REQUIRED: u32 = 2048u32; pub const DS_TRY_NEXTCLOSEST_SITE: u32 = 262144u32; pub const DS_WEB_SERVICE_REQUIRED: u32 = 1048576u32; pub const DS_WRITABLE_FLAG: u32 = 256u32; pub const DS_WRITABLE_REQUIRED: u32 = 4096u32; pub const DS_WS_FLAG: u32 = 8192u32; #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsAddSidHistoryA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param6: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param7: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>( hds: Param0, flags: u32, srcdomain: Param2, srcprincipal: Param3, srcdomaincontroller: Param4, srcdomaincreds: *const ::core::ffi::c_void, dstdomain: Param6, dstprincipal: Param7, ) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsAddSidHistoryA(hds: super::super::Foundation::HANDLE, flags: u32, srcdomain: super::super::Foundation::PSTR, srcprincipal: super::super::Foundation::PSTR, srcdomaincontroller: super::super::Foundation::PSTR, srcdomaincreds: *const ::core::ffi::c_void, dstdomain: super::super::Foundation::PSTR, dstprincipal: super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(DsAddSidHistoryA(hds.into_param().abi(), ::core::mem::transmute(flags), srcdomain.into_param().abi(), srcprincipal.into_param().abi(), srcdomaincontroller.into_param().abi(), ::core::mem::transmute(srcdomaincreds), dstdomain.into_param().abi(), dstprincipal.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsAddSidHistoryW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param6: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param7: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>( hds: Param0, flags: u32, srcdomain: Param2, srcprincipal: Param3, srcdomaincontroller: Param4, srcdomaincreds: *const ::core::ffi::c_void, dstdomain: Param6, dstprincipal: Param7, ) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsAddSidHistoryW(hds: super::super::Foundation::HANDLE, flags: u32, srcdomain: super::super::Foundation::PWSTR, srcprincipal: super::super::Foundation::PWSTR, srcdomaincontroller: super::super::Foundation::PWSTR, srcdomaincreds: *const ::core::ffi::c_void, dstdomain: super::super::Foundation::PWSTR, dstprincipal: super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsAddSidHistoryW(hds.into_param().abi(), ::core::mem::transmute(flags), srcdomain.into_param().abi(), srcprincipal.into_param().abi(), srcdomaincontroller.into_param().abi(), ::core::mem::transmute(srcdomaincreds), dstdomain.into_param().abi(), dstprincipal.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn DsAddressToSiteNamesA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(computername: Param0, entrycount: u32, socketaddresses: *const super::WinSock::SOCKET_ADDRESS, sitenames: *mut *mut super::super::Foundation::PSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsAddressToSiteNamesA(computername: super::super::Foundation::PSTR, entrycount: u32, socketaddresses: *const super::WinSock::SOCKET_ADDRESS, sitenames: *mut *mut super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(DsAddressToSiteNamesA(computername.into_param().abi(), ::core::mem::transmute(entrycount), ::core::mem::transmute(socketaddresses), ::core::mem::transmute(sitenames))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn DsAddressToSiteNamesExA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(computername: Param0, entrycount: u32, socketaddresses: *const super::WinSock::SOCKET_ADDRESS, sitenames: *mut *mut super::super::Foundation::PSTR, subnetnames: *mut *mut super::super::Foundation::PSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsAddressToSiteNamesExA(computername: super::super::Foundation::PSTR, entrycount: u32, socketaddresses: *const super::WinSock::SOCKET_ADDRESS, sitenames: *mut *mut super::super::Foundation::PSTR, subnetnames: *mut *mut super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(DsAddressToSiteNamesExA(computername.into_param().abi(), ::core::mem::transmute(entrycount), ::core::mem::transmute(socketaddresses), ::core::mem::transmute(sitenames), ::core::mem::transmute(subnetnames))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn DsAddressToSiteNamesExW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(computername: Param0, entrycount: u32, socketaddresses: *const super::WinSock::SOCKET_ADDRESS, sitenames: *mut *mut super::super::Foundation::PWSTR, subnetnames: *mut *mut super::super::Foundation::PWSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsAddressToSiteNamesExW(computername: super::super::Foundation::PWSTR, entrycount: u32, socketaddresses: *const super::WinSock::SOCKET_ADDRESS, sitenames: *mut *mut super::super::Foundation::PWSTR, subnetnames: *mut *mut super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsAddressToSiteNamesExW(computername.into_param().abi(), ::core::mem::transmute(entrycount), ::core::mem::transmute(socketaddresses), ::core::mem::transmute(sitenames), ::core::mem::transmute(subnetnames))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn DsAddressToSiteNamesW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(computername: Param0, entrycount: u32, socketaddresses: *const super::WinSock::SOCKET_ADDRESS, sitenames: *mut *mut super::super::Foundation::PWSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsAddressToSiteNamesW(computername: super::super::Foundation::PWSTR, entrycount: u32, socketaddresses: *const super::WinSock::SOCKET_ADDRESS, sitenames: *mut *mut super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsAddressToSiteNamesW(computername.into_param().abi(), ::core::mem::transmute(entrycount), ::core::mem::transmute(socketaddresses), ::core::mem::transmute(sitenames))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsBindA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(domaincontrollername: Param0, dnsdomainname: Param1, phds: *mut super::super::Foundation::HANDLE) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsBindA(domaincontrollername: super::super::Foundation::PSTR, dnsdomainname: super::super::Foundation::PSTR, phds: *mut super::super::Foundation::HANDLE) -> u32; } ::core::mem::transmute(DsBindA(domaincontrollername.into_param().abi(), dnsdomainname.into_param().abi(), ::core::mem::transmute(phds))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsBindByInstanceA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>( servername: Param0, annotation: Param1, instanceguid: *const ::windows::core::GUID, dnsdomainname: Param3, authidentity: *const ::core::ffi::c_void, serviceprincipalname: Param5, bindflags: u32, phds: *mut super::super::Foundation::HANDLE, ) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsBindByInstanceA(servername: super::super::Foundation::PSTR, annotation: super::super::Foundation::PSTR, instanceguid: *const ::windows::core::GUID, dnsdomainname: super::super::Foundation::PSTR, authidentity: *const ::core::ffi::c_void, serviceprincipalname: super::super::Foundation::PSTR, bindflags: u32, phds: *mut super::super::Foundation::HANDLE) -> u32; } ::core::mem::transmute(DsBindByInstanceA(servername.into_param().abi(), annotation.into_param().abi(), ::core::mem::transmute(instanceguid), dnsdomainname.into_param().abi(), ::core::mem::transmute(authidentity), serviceprincipalname.into_param().abi(), ::core::mem::transmute(bindflags), ::core::mem::transmute(phds))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsBindByInstanceW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>( servername: Param0, annotation: Param1, instanceguid: *const ::windows::core::GUID, dnsdomainname: Param3, authidentity: *const ::core::ffi::c_void, serviceprincipalname: Param5, bindflags: u32, phds: *mut super::super::Foundation::HANDLE, ) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsBindByInstanceW(servername: super::super::Foundation::PWSTR, annotation: super::super::Foundation::PWSTR, instanceguid: *const ::windows::core::GUID, dnsdomainname: super::super::Foundation::PWSTR, authidentity: *const ::core::ffi::c_void, serviceprincipalname: super::super::Foundation::PWSTR, bindflags: u32, phds: *mut super::super::Foundation::HANDLE) -> u32; } ::core::mem::transmute(DsBindByInstanceW(servername.into_param().abi(), annotation.into_param().abi(), ::core::mem::transmute(instanceguid), dnsdomainname.into_param().abi(), ::core::mem::transmute(authidentity), serviceprincipalname.into_param().abi(), ::core::mem::transmute(bindflags), ::core::mem::transmute(phds))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsBindToISTGA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(sitename: Param0, phds: *mut super::super::Foundation::HANDLE) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsBindToISTGA(sitename: super::super::Foundation::PSTR, phds: *mut super::super::Foundation::HANDLE) -> u32; } ::core::mem::transmute(DsBindToISTGA(sitename.into_param().abi(), ::core::mem::transmute(phds))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsBindToISTGW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(sitename: Param0, phds: *mut super::super::Foundation::HANDLE) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsBindToISTGW(sitename: super::super::Foundation::PWSTR, phds: *mut super::super::Foundation::HANDLE) -> u32; } ::core::mem::transmute(DsBindToISTGW(sitename.into_param().abi(), ::core::mem::transmute(phds))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsBindW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(domaincontrollername: Param0, dnsdomainname: Param1, phds: *mut super::super::Foundation::HANDLE) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsBindW(domaincontrollername: super::super::Foundation::PWSTR, dnsdomainname: super::super::Foundation::PWSTR, phds: *mut super::super::Foundation::HANDLE) -> u32; } ::core::mem::transmute(DsBindW(domaincontrollername.into_param().abi(), dnsdomainname.into_param().abi(), ::core::mem::transmute(phds))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsBindWithCredA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(domaincontrollername: Param0, dnsdomainname: Param1, authidentity: *const ::core::ffi::c_void, phds: *mut super::super::Foundation::HANDLE) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsBindWithCredA(domaincontrollername: super::super::Foundation::PSTR, dnsdomainname: super::super::Foundation::PSTR, authidentity: *const ::core::ffi::c_void, phds: *mut super::super::Foundation::HANDLE) -> u32; } ::core::mem::transmute(DsBindWithCredA(domaincontrollername.into_param().abi(), dnsdomainname.into_param().abi(), ::core::mem::transmute(authidentity), ::core::mem::transmute(phds))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsBindWithCredW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(domaincontrollername: Param0, dnsdomainname: Param1, authidentity: *const ::core::ffi::c_void, phds: *mut super::super::Foundation::HANDLE) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsBindWithCredW(domaincontrollername: super::super::Foundation::PWSTR, dnsdomainname: super::super::Foundation::PWSTR, authidentity: *const ::core::ffi::c_void, phds: *mut super::super::Foundation::HANDLE) -> u32; } ::core::mem::transmute(DsBindWithCredW(domaincontrollername.into_param().abi(), dnsdomainname.into_param().abi(), ::core::mem::transmute(authidentity), ::core::mem::transmute(phds))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsBindWithSpnA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(domaincontrollername: Param0, dnsdomainname: Param1, authidentity: *const ::core::ffi::c_void, serviceprincipalname: Param3, phds: *mut super::super::Foundation::HANDLE) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsBindWithSpnA(domaincontrollername: super::super::Foundation::PSTR, dnsdomainname: super::super::Foundation::PSTR, authidentity: *const ::core::ffi::c_void, serviceprincipalname: super::super::Foundation::PSTR, phds: *mut super::super::Foundation::HANDLE) -> u32; } ::core::mem::transmute(DsBindWithSpnA(domaincontrollername.into_param().abi(), dnsdomainname.into_param().abi(), ::core::mem::transmute(authidentity), serviceprincipalname.into_param().abi(), ::core::mem::transmute(phds))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsBindWithSpnExA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(domaincontrollername: Param0, dnsdomainname: Param1, authidentity: *const ::core::ffi::c_void, serviceprincipalname: Param3, bindflags: u32, phds: *mut super::super::Foundation::HANDLE) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsBindWithSpnExA(domaincontrollername: super::super::Foundation::PSTR, dnsdomainname: super::super::Foundation::PSTR, authidentity: *const ::core::ffi::c_void, serviceprincipalname: super::super::Foundation::PSTR, bindflags: u32, phds: *mut super::super::Foundation::HANDLE) -> u32; } ::core::mem::transmute(DsBindWithSpnExA(domaincontrollername.into_param().abi(), dnsdomainname.into_param().abi(), ::core::mem::transmute(authidentity), serviceprincipalname.into_param().abi(), ::core::mem::transmute(bindflags), ::core::mem::transmute(phds))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsBindWithSpnExW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(domaincontrollername: Param0, dnsdomainname: Param1, authidentity: *const ::core::ffi::c_void, serviceprincipalname: Param3, bindflags: u32, phds: *mut super::super::Foundation::HANDLE) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsBindWithSpnExW(domaincontrollername: super::super::Foundation::PWSTR, dnsdomainname: super::super::Foundation::PWSTR, authidentity: *const ::core::ffi::c_void, serviceprincipalname: super::super::Foundation::PWSTR, bindflags: u32, phds: *mut super::super::Foundation::HANDLE) -> u32; } ::core::mem::transmute(DsBindWithSpnExW(domaincontrollername.into_param().abi(), dnsdomainname.into_param().abi(), ::core::mem::transmute(authidentity), serviceprincipalname.into_param().abi(), ::core::mem::transmute(bindflags), ::core::mem::transmute(phds))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsBindWithSpnW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(domaincontrollername: Param0, dnsdomainname: Param1, authidentity: *const ::core::ffi::c_void, serviceprincipalname: Param3, phds: *mut super::super::Foundation::HANDLE) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsBindWithSpnW(domaincontrollername: super::super::Foundation::PWSTR, dnsdomainname: super::super::Foundation::PWSTR, authidentity: *const ::core::ffi::c_void, serviceprincipalname: super::super::Foundation::PWSTR, phds: *mut super::super::Foundation::HANDLE) -> u32; } ::core::mem::transmute(DsBindWithSpnW(domaincontrollername.into_param().abi(), dnsdomainname.into_param().abi(), ::core::mem::transmute(authidentity), serviceprincipalname.into_param().abi(), ::core::mem::transmute(phds))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsBindingSetTimeout<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>>(hds: Param0, ctimeoutsecs: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsBindingSetTimeout(hds: super::super::Foundation::HANDLE, ctimeoutsecs: u32) -> u32; } ::core::mem::transmute(DsBindingSetTimeout(hds.into_param().abi(), ::core::mem::transmute(ctimeoutsecs))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] #[inline] pub unsafe fn DsBrowseForContainerA(pinfo: *mut DSBROWSEINFOA) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsBrowseForContainerA(pinfo: *mut ::core::mem::ManuallyDrop<DSBROWSEINFOA>) -> i32; } ::core::mem::transmute(DsBrowseForContainerA(::core::mem::transmute(pinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] #[inline] pub unsafe fn DsBrowseForContainerW(pinfo: *mut DSBROWSEINFOW) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsBrowseForContainerW(pinfo: *mut ::core::mem::ManuallyDrop<DSBROWSEINFOW>) -> i32; } ::core::mem::transmute(DsBrowseForContainerW(::core::mem::transmute(pinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsClientMakeSpnForTargetServerA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(serviceclass: Param0, servicename: Param1, pcspnlength: *mut u32, pszspn: super::super::Foundation::PSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsClientMakeSpnForTargetServerA(serviceclass: super::super::Foundation::PSTR, servicename: super::super::Foundation::PSTR, pcspnlength: *mut u32, pszspn: super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(DsClientMakeSpnForTargetServerA(serviceclass.into_param().abi(), servicename.into_param().abi(), ::core::mem::transmute(pcspnlength), ::core::mem::transmute(pszspn))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsClientMakeSpnForTargetServerW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(serviceclass: Param0, servicename: Param1, pcspnlength: *mut u32, pszspn: super::super::Foundation::PWSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsClientMakeSpnForTargetServerW(serviceclass: super::super::Foundation::PWSTR, servicename: super::super::Foundation::PWSTR, pcspnlength: *mut u32, pszspn: super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsClientMakeSpnForTargetServerW(serviceclass.into_param().abi(), servicename.into_param().abi(), ::core::mem::transmute(pcspnlength), ::core::mem::transmute(pszspn))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsCrackNamesA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>>(hds: Param0, flags: DS_NAME_FLAGS, formatoffered: DS_NAME_FORMAT, formatdesired: DS_NAME_FORMAT, cnames: u32, rpnames: *const super::super::Foundation::PSTR, ppresult: *mut *mut DS_NAME_RESULTA) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsCrackNamesA(hds: super::super::Foundation::HANDLE, flags: DS_NAME_FLAGS, formatoffered: DS_NAME_FORMAT, formatdesired: DS_NAME_FORMAT, cnames: u32, rpnames: *const super::super::Foundation::PSTR, ppresult: *mut *mut DS_NAME_RESULTA) -> u32; } ::core::mem::transmute(DsCrackNamesA(hds.into_param().abi(), ::core::mem::transmute(flags), ::core::mem::transmute(formatoffered), ::core::mem::transmute(formatdesired), ::core::mem::transmute(cnames), ::core::mem::transmute(rpnames), ::core::mem::transmute(ppresult))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsCrackNamesW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>>(hds: Param0, flags: DS_NAME_FLAGS, formatoffered: DS_NAME_FORMAT, formatdesired: DS_NAME_FORMAT, cnames: u32, rpnames: *const super::super::Foundation::PWSTR, ppresult: *mut *mut DS_NAME_RESULTW) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsCrackNamesW(hds: super::super::Foundation::HANDLE, flags: DS_NAME_FLAGS, formatoffered: DS_NAME_FORMAT, formatdesired: DS_NAME_FORMAT, cnames: u32, rpnames: *const super::super::Foundation::PWSTR, ppresult: *mut *mut DS_NAME_RESULTW) -> u32; } ::core::mem::transmute(DsCrackNamesW(hds.into_param().abi(), ::core::mem::transmute(flags), ::core::mem::transmute(formatoffered), ::core::mem::transmute(formatdesired), ::core::mem::transmute(cnames), ::core::mem::transmute(rpnames), ::core::mem::transmute(ppresult))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsCrackSpn2A<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pszspn: Param0, cspn: u32, pcserviceclass: *mut u32, serviceclass: super::super::Foundation::PSTR, pcservicename: *mut u32, servicename: super::super::Foundation::PSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PSTR, pinstanceport: *mut u16) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsCrackSpn2A(pszspn: super::super::Foundation::PSTR, cspn: u32, pcserviceclass: *mut u32, serviceclass: super::super::Foundation::PSTR, pcservicename: *mut u32, servicename: super::super::Foundation::PSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PSTR, pinstanceport: *mut u16) -> u32; } ::core::mem::transmute(DsCrackSpn2A( pszspn.into_param().abi(), ::core::mem::transmute(cspn), ::core::mem::transmute(pcserviceclass), ::core::mem::transmute(serviceclass), ::core::mem::transmute(pcservicename), ::core::mem::transmute(servicename), ::core::mem::transmute(pcinstancename), ::core::mem::transmute(instancename), ::core::mem::transmute(pinstanceport), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsCrackSpn2W<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pszspn: Param0, cspn: u32, pcserviceclass: *mut u32, serviceclass: super::super::Foundation::PWSTR, pcservicename: *mut u32, servicename: super::super::Foundation::PWSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PWSTR, pinstanceport: *mut u16) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsCrackSpn2W(pszspn: super::super::Foundation::PWSTR, cspn: u32, pcserviceclass: *mut u32, serviceclass: super::super::Foundation::PWSTR, pcservicename: *mut u32, servicename: super::super::Foundation::PWSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PWSTR, pinstanceport: *mut u16) -> u32; } ::core::mem::transmute(DsCrackSpn2W( pszspn.into_param().abi(), ::core::mem::transmute(cspn), ::core::mem::transmute(pcserviceclass), ::core::mem::transmute(serviceclass), ::core::mem::transmute(pcservicename), ::core::mem::transmute(servicename), ::core::mem::transmute(pcinstancename), ::core::mem::transmute(instancename), ::core::mem::transmute(pinstanceport), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsCrackSpn3W<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pszspn: Param0, cspn: u32, pchostname: *mut u32, hostname: super::super::Foundation::PWSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PWSTR, pportnumber: *mut u16, pcdomainname: *mut u32, domainname: super::super::Foundation::PWSTR, pcrealmname: *mut u32, realmname: super::super::Foundation::PWSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsCrackSpn3W(pszspn: super::super::Foundation::PWSTR, cspn: u32, pchostname: *mut u32, hostname: super::super::Foundation::PWSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PWSTR, pportnumber: *mut u16, pcdomainname: *mut u32, domainname: super::super::Foundation::PWSTR, pcrealmname: *mut u32, realmname: super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsCrackSpn3W( pszspn.into_param().abi(), ::core::mem::transmute(cspn), ::core::mem::transmute(pchostname), ::core::mem::transmute(hostname), ::core::mem::transmute(pcinstancename), ::core::mem::transmute(instancename), ::core::mem::transmute(pportnumber), ::core::mem::transmute(pcdomainname), ::core::mem::transmute(domainname), ::core::mem::transmute(pcrealmname), ::core::mem::transmute(realmname), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsCrackSpn4W<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pszspn: Param0, cspn: u32, pchostname: *mut u32, hostname: super::super::Foundation::PWSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PWSTR, pcportname: *mut u32, portname: super::super::Foundation::PWSTR, pcdomainname: *mut u32, domainname: super::super::Foundation::PWSTR, pcrealmname: *mut u32, realmname: super::super::Foundation::PWSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsCrackSpn4W(pszspn: super::super::Foundation::PWSTR, cspn: u32, pchostname: *mut u32, hostname: super::super::Foundation::PWSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PWSTR, pcportname: *mut u32, portname: super::super::Foundation::PWSTR, pcdomainname: *mut u32, domainname: super::super::Foundation::PWSTR, pcrealmname: *mut u32, realmname: super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsCrackSpn4W( pszspn.into_param().abi(), ::core::mem::transmute(cspn), ::core::mem::transmute(pchostname), ::core::mem::transmute(hostname), ::core::mem::transmute(pcinstancename), ::core::mem::transmute(instancename), ::core::mem::transmute(pcportname), ::core::mem::transmute(portname), ::core::mem::transmute(pcdomainname), ::core::mem::transmute(domainname), ::core::mem::transmute(pcrealmname), ::core::mem::transmute(realmname), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsCrackSpnA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pszspn: Param0, pcserviceclass: *mut u32, serviceclass: super::super::Foundation::PSTR, pcservicename: *mut u32, servicename: super::super::Foundation::PSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PSTR, pinstanceport: *mut u16) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsCrackSpnA(pszspn: super::super::Foundation::PSTR, pcserviceclass: *mut u32, serviceclass: super::super::Foundation::PSTR, pcservicename: *mut u32, servicename: super::super::Foundation::PSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PSTR, pinstanceport: *mut u16) -> u32; } ::core::mem::transmute(DsCrackSpnA( pszspn.into_param().abi(), ::core::mem::transmute(pcserviceclass), ::core::mem::transmute(serviceclass), ::core::mem::transmute(pcservicename), ::core::mem::transmute(servicename), ::core::mem::transmute(pcinstancename), ::core::mem::transmute(instancename), ::core::mem::transmute(pinstanceport), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsCrackSpnW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pszspn: Param0, pcserviceclass: *mut u32, serviceclass: super::super::Foundation::PWSTR, pcservicename: *mut u32, servicename: super::super::Foundation::PWSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PWSTR, pinstanceport: *mut u16) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsCrackSpnW(pszspn: super::super::Foundation::PWSTR, pcserviceclass: *mut u32, serviceclass: super::super::Foundation::PWSTR, pcservicename: *mut u32, servicename: super::super::Foundation::PWSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PWSTR, pinstanceport: *mut u16) -> u32; } ::core::mem::transmute(DsCrackSpnW( pszspn.into_param().abi(), ::core::mem::transmute(pcserviceclass), ::core::mem::transmute(serviceclass), ::core::mem::transmute(pcservicename), ::core::mem::transmute(servicename), ::core::mem::transmute(pcinstancename), ::core::mem::transmute(instancename), ::core::mem::transmute(pinstanceport), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsCrackUnquotedMangledRdnA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pszrdn: Param0, cchrdn: u32, pguid: *mut ::windows::core::GUID, pedsmanglefor: *mut DS_MANGLE_FOR) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsCrackUnquotedMangledRdnA(pszrdn: super::super::Foundation::PSTR, cchrdn: u32, pguid: *mut ::windows::core::GUID, pedsmanglefor: *mut DS_MANGLE_FOR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(DsCrackUnquotedMangledRdnA(pszrdn.into_param().abi(), ::core::mem::transmute(cchrdn), ::core::mem::transmute(pguid), ::core::mem::transmute(pedsmanglefor))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsCrackUnquotedMangledRdnW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pszrdn: Param0, cchrdn: u32, pguid: *mut ::windows::core::GUID, pedsmanglefor: *mut DS_MANGLE_FOR) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsCrackUnquotedMangledRdnW(pszrdn: super::super::Foundation::PWSTR, cchrdn: u32, pguid: *mut ::windows::core::GUID, pedsmanglefor: *mut DS_MANGLE_FOR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(DsCrackUnquotedMangledRdnW(pszrdn.into_param().abi(), ::core::mem::transmute(cchrdn), ::core::mem::transmute(pguid), ::core::mem::transmute(pedsmanglefor))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsDeregisterDnsHostRecordsA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(servername: Param0, dnsdomainname: Param1, domainguid: *const ::windows::core::GUID, dsaguid: *const ::windows::core::GUID, dnshostname: Param4) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsDeregisterDnsHostRecordsA(servername: super::super::Foundation::PSTR, dnsdomainname: super::super::Foundation::PSTR, domainguid: *const ::windows::core::GUID, dsaguid: *const ::windows::core::GUID, dnshostname: super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(DsDeregisterDnsHostRecordsA(servername.into_param().abi(), dnsdomainname.into_param().abi(), ::core::mem::transmute(domainguid), ::core::mem::transmute(dsaguid), dnshostname.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsDeregisterDnsHostRecordsW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(servername: Param0, dnsdomainname: Param1, domainguid: *const ::windows::core::GUID, dsaguid: *const ::windows::core::GUID, dnshostname: Param4) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsDeregisterDnsHostRecordsW(servername: super::super::Foundation::PWSTR, dnsdomainname: super::super::Foundation::PWSTR, domainguid: *const ::windows::core::GUID, dsaguid: *const ::windows::core::GUID, dnshostname: super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsDeregisterDnsHostRecordsW(servername.into_param().abi(), dnsdomainname.into_param().abi(), ::core::mem::transmute(domainguid), ::core::mem::transmute(dsaguid), dnshostname.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsEnumerateDomainTrustsA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(servername: Param0, flags: u32, domains: *mut *mut DS_DOMAIN_TRUSTSA, domaincount: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsEnumerateDomainTrustsA(servername: super::super::Foundation::PSTR, flags: u32, domains: *mut *mut DS_DOMAIN_TRUSTSA, domaincount: *mut u32) -> u32; } ::core::mem::transmute(DsEnumerateDomainTrustsA(servername.into_param().abi(), ::core::mem::transmute(flags), ::core::mem::transmute(domains), ::core::mem::transmute(domaincount))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsEnumerateDomainTrustsW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(servername: Param0, flags: u32, domains: *mut *mut DS_DOMAIN_TRUSTSW, domaincount: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsEnumerateDomainTrustsW(servername: super::super::Foundation::PWSTR, flags: u32, domains: *mut *mut DS_DOMAIN_TRUSTSW, domaincount: *mut u32) -> u32; } ::core::mem::transmute(DsEnumerateDomainTrustsW(servername.into_param().abi(), ::core::mem::transmute(flags), ::core::mem::transmute(domains), ::core::mem::transmute(domaincount))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn DsFreeDomainControllerInfoA(infolevel: u32, cinfo: u32, pinfo: *const ::core::ffi::c_void) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsFreeDomainControllerInfoA(infolevel: u32, cinfo: u32, pinfo: *const ::core::ffi::c_void); } ::core::mem::transmute(DsFreeDomainControllerInfoA(::core::mem::transmute(infolevel), ::core::mem::transmute(cinfo), ::core::mem::transmute(pinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn DsFreeDomainControllerInfoW(infolevel: u32, cinfo: u32, pinfo: *const ::core::ffi::c_void) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsFreeDomainControllerInfoW(infolevel: u32, cinfo: u32, pinfo: *const ::core::ffi::c_void); } ::core::mem::transmute(DsFreeDomainControllerInfoW(::core::mem::transmute(infolevel), ::core::mem::transmute(cinfo), ::core::mem::transmute(pinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsFreeNameResultA(presult: *const DS_NAME_RESULTA) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsFreeNameResultA(presult: *const DS_NAME_RESULTA); } ::core::mem::transmute(DsFreeNameResultA(::core::mem::transmute(presult))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsFreeNameResultW(presult: *const DS_NAME_RESULTW) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsFreeNameResultW(presult: *const DS_NAME_RESULTW); } ::core::mem::transmute(DsFreeNameResultW(::core::mem::transmute(presult))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn DsFreePasswordCredentials(authidentity: *const ::core::ffi::c_void) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsFreePasswordCredentials(authidentity: *const ::core::ffi::c_void); } ::core::mem::transmute(DsFreePasswordCredentials(::core::mem::transmute(authidentity))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsFreeSchemaGuidMapA(pguidmap: *const DS_SCHEMA_GUID_MAPA) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsFreeSchemaGuidMapA(pguidmap: *const DS_SCHEMA_GUID_MAPA); } ::core::mem::transmute(DsFreeSchemaGuidMapA(::core::mem::transmute(pguidmap))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsFreeSchemaGuidMapW(pguidmap: *const DS_SCHEMA_GUID_MAPW) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsFreeSchemaGuidMapW(pguidmap: *const DS_SCHEMA_GUID_MAPW); } ::core::mem::transmute(DsFreeSchemaGuidMapW(::core::mem::transmute(pguidmap))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsFreeSpnArrayA(cspn: u32, rpszspn: *mut super::super::Foundation::PSTR) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsFreeSpnArrayA(cspn: u32, rpszspn: *mut super::super::Foundation::PSTR); } ::core::mem::transmute(DsFreeSpnArrayA(::core::mem::transmute(cspn), ::core::mem::transmute(rpszspn))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsFreeSpnArrayW(cspn: u32, rpszspn: *mut super::super::Foundation::PWSTR) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsFreeSpnArrayW(cspn: u32, rpszspn: *mut super::super::Foundation::PWSTR); } ::core::mem::transmute(DsFreeSpnArrayW(::core::mem::transmute(cspn), ::core::mem::transmute(rpszspn))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn DsGetDcCloseW<'a, Param0: ::windows::core::IntoParam<'a, GetDcContextHandle>>(getdccontexthandle: Param0) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetDcCloseW(getdccontexthandle: GetDcContextHandle); } ::core::mem::transmute(DsGetDcCloseW(getdccontexthandle.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsGetDcNameA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(computername: Param0, domainname: Param1, domainguid: *const ::windows::core::GUID, sitename: Param3, flags: u32, domaincontrollerinfo: *mut *mut DOMAIN_CONTROLLER_INFOA) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetDcNameA(computername: super::super::Foundation::PSTR, domainname: super::super::Foundation::PSTR, domainguid: *const ::windows::core::GUID, sitename: super::super::Foundation::PSTR, flags: u32, domaincontrollerinfo: *mut *mut DOMAIN_CONTROLLER_INFOA) -> u32; } ::core::mem::transmute(DsGetDcNameA(computername.into_param().abi(), domainname.into_param().abi(), ::core::mem::transmute(domainguid), sitename.into_param().abi(), ::core::mem::transmute(flags), ::core::mem::transmute(domaincontrollerinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsGetDcNameW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(computername: Param0, domainname: Param1, domainguid: *const ::windows::core::GUID, sitename: Param3, flags: u32, domaincontrollerinfo: *mut *mut DOMAIN_CONTROLLER_INFOW) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetDcNameW(computername: super::super::Foundation::PWSTR, domainname: super::super::Foundation::PWSTR, domainguid: *const ::windows::core::GUID, sitename: super::super::Foundation::PWSTR, flags: u32, domaincontrollerinfo: *mut *mut DOMAIN_CONTROLLER_INFOW) -> u32; } ::core::mem::transmute(DsGetDcNameW(computername.into_param().abi(), domainname.into_param().abi(), ::core::mem::transmute(domainguid), sitename.into_param().abi(), ::core::mem::transmute(flags), ::core::mem::transmute(domaincontrollerinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn DsGetDcNextA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>>(getdccontexthandle: Param0, sockaddresscount: *mut u32, sockaddresses: *mut *mut super::WinSock::SOCKET_ADDRESS, dnshostname: *mut super::super::Foundation::PSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetDcNextA(getdccontexthandle: super::super::Foundation::HANDLE, sockaddresscount: *mut u32, sockaddresses: *mut *mut super::WinSock::SOCKET_ADDRESS, dnshostname: *mut super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(DsGetDcNextA(getdccontexthandle.into_param().abi(), ::core::mem::transmute(sockaddresscount), ::core::mem::transmute(sockaddresses), ::core::mem::transmute(dnshostname))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn DsGetDcNextW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>>(getdccontexthandle: Param0, sockaddresscount: *mut u32, sockaddresses: *mut *mut super::WinSock::SOCKET_ADDRESS, dnshostname: *mut super::super::Foundation::PWSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetDcNextW(getdccontexthandle: super::super::Foundation::HANDLE, sockaddresscount: *mut u32, sockaddresses: *mut *mut super::WinSock::SOCKET_ADDRESS, dnshostname: *mut super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsGetDcNextW(getdccontexthandle.into_param().abi(), ::core::mem::transmute(sockaddresscount), ::core::mem::transmute(sockaddresses), ::core::mem::transmute(dnshostname))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsGetDcOpenA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(dnsname: Param0, optionflags: u32, sitename: Param2, domainguid: *const ::windows::core::GUID, dnsforestname: Param4, dcflags: u32, retgetdccontext: *mut GetDcContextHandle) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetDcOpenA(dnsname: super::super::Foundation::PSTR, optionflags: u32, sitename: super::super::Foundation::PSTR, domainguid: *const ::windows::core::GUID, dnsforestname: super::super::Foundation::PSTR, dcflags: u32, retgetdccontext: *mut GetDcContextHandle) -> u32; } ::core::mem::transmute(DsGetDcOpenA(dnsname.into_param().abi(), ::core::mem::transmute(optionflags), sitename.into_param().abi(), ::core::mem::transmute(domainguid), dnsforestname.into_param().abi(), ::core::mem::transmute(dcflags), ::core::mem::transmute(retgetdccontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsGetDcOpenW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dnsname: Param0, optionflags: u32, sitename: Param2, domainguid: *const ::windows::core::GUID, dnsforestname: Param4, dcflags: u32, retgetdccontext: *mut GetDcContextHandle) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetDcOpenW(dnsname: super::super::Foundation::PWSTR, optionflags: u32, sitename: super::super::Foundation::PWSTR, domainguid: *const ::windows::core::GUID, dnsforestname: super::super::Foundation::PWSTR, dcflags: u32, retgetdccontext: *mut GetDcContextHandle) -> u32; } ::core::mem::transmute(DsGetDcOpenW(dnsname.into_param().abi(), ::core::mem::transmute(optionflags), sitename.into_param().abi(), ::core::mem::transmute(domainguid), dnsforestname.into_param().abi(), ::core::mem::transmute(dcflags), ::core::mem::transmute(retgetdccontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsGetDcSiteCoverageA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(servername: Param0, entrycount: *mut u32, sitenames: *mut *mut super::super::Foundation::PSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetDcSiteCoverageA(servername: super::super::Foundation::PSTR, entrycount: *mut u32, sitenames: *mut *mut super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(DsGetDcSiteCoverageA(servername.into_param().abi(), ::core::mem::transmute(entrycount), ::core::mem::transmute(sitenames))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsGetDcSiteCoverageW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(servername: Param0, entrycount: *mut u32, sitenames: *mut *mut super::super::Foundation::PWSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetDcSiteCoverageW(servername: super::super::Foundation::PWSTR, entrycount: *mut u32, sitenames: *mut *mut super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsGetDcSiteCoverageW(servername.into_param().abi(), ::core::mem::transmute(entrycount), ::core::mem::transmute(sitenames))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsGetDomainControllerInfoA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hds: Param0, domainname: Param1, infolevel: u32, pcout: *mut u32, ppinfo: *mut *mut ::core::ffi::c_void) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetDomainControllerInfoA(hds: super::super::Foundation::HANDLE, domainname: super::super::Foundation::PSTR, infolevel: u32, pcout: *mut u32, ppinfo: *mut *mut ::core::ffi::c_void) -> u32; } ::core::mem::transmute(DsGetDomainControllerInfoA(hds.into_param().abi(), domainname.into_param().abi(), ::core::mem::transmute(infolevel), ::core::mem::transmute(pcout), ::core::mem::transmute(ppinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsGetDomainControllerInfoW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hds: Param0, domainname: Param1, infolevel: u32, pcout: *mut u32, ppinfo: *mut *mut ::core::ffi::c_void) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetDomainControllerInfoW(hds: super::super::Foundation::HANDLE, domainname: super::super::Foundation::PWSTR, infolevel: u32, pcout: *mut u32, ppinfo: *mut *mut ::core::ffi::c_void) -> u32; } ::core::mem::transmute(DsGetDomainControllerInfoW(hds.into_param().abi(), domainname.into_param().abi(), ::core::mem::transmute(infolevel), ::core::mem::transmute(pcout), ::core::mem::transmute(ppinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Authentication_Identity"))] #[inline] pub unsafe fn DsGetForestTrustInformationW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(servername: Param0, trusteddomainname: Param1, flags: u32, foresttrustinfo: *mut *mut super::super::Security::Authentication::Identity::LSA_FOREST_TRUST_INFORMATION) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetForestTrustInformationW(servername: super::super::Foundation::PWSTR, trusteddomainname: super::super::Foundation::PWSTR, flags: u32, foresttrustinfo: *mut *mut super::super::Security::Authentication::Identity::LSA_FOREST_TRUST_INFORMATION) -> u32; } ::core::mem::transmute(DsGetForestTrustInformationW(servername.into_param().abi(), trusteddomainname.into_param().abi(), ::core::mem::transmute(flags), ::core::mem::transmute(foresttrustinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsGetFriendlyClassName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pszobjectclass: Param0, pszbuffer: super::super::Foundation::PWSTR, cchbuffer: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetFriendlyClassName(pszobjectclass: super::super::Foundation::PWSTR, pszbuffer: super::super::Foundation::PWSTR, cchbuffer: u32) -> ::windows::core::HRESULT; } DsGetFriendlyClassName(pszobjectclass.into_param().abi(), ::core::mem::transmute(pszbuffer), ::core::mem::transmute(cchbuffer)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] pub unsafe fn DsGetIcon<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwflags: u32, pszobjectclass: Param1, cximage: i32, cyimage: i32) -> super::super::UI::WindowsAndMessaging::HICON { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetIcon(dwflags: u32, pszobjectclass: super::super::Foundation::PWSTR, cximage: i32, cyimage: i32) -> super::super::UI::WindowsAndMessaging::HICON; } ::core::mem::transmute(DsGetIcon(::core::mem::transmute(dwflags), pszobjectclass.into_param().abi(), ::core::mem::transmute(cximage), ::core::mem::transmute(cyimage))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsGetRdnW(ppdn: *mut super::super::Foundation::PWSTR, pcdn: *mut u32, ppkey: *mut super::super::Foundation::PWSTR, pckey: *mut u32, ppval: *mut super::super::Foundation::PWSTR, pcval: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetRdnW(ppdn: *mut super::super::Foundation::PWSTR, pcdn: *mut u32, ppkey: *mut super::super::Foundation::PWSTR, pckey: *mut u32, ppval: *mut super::super::Foundation::PWSTR, pcval: *mut u32) -> u32; } ::core::mem::transmute(DsGetRdnW(::core::mem::transmute(ppdn), ::core::mem::transmute(pcdn), ::core::mem::transmute(ppkey), ::core::mem::transmute(pckey), ::core::mem::transmute(ppval), ::core::mem::transmute(pcval))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsGetSiteNameA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(computername: Param0, sitename: *mut super::super::Foundation::PSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetSiteNameA(computername: super::super::Foundation::PSTR, sitename: *mut super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(DsGetSiteNameA(computername.into_param().abi(), ::core::mem::transmute(sitename))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsGetSiteNameW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(computername: Param0, sitename: *mut super::super::Foundation::PWSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetSiteNameW(computername: super::super::Foundation::PWSTR, sitename: *mut super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsGetSiteNameW(computername.into_param().abi(), ::core::mem::transmute(sitename))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsGetSpnA<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(servicetype: DS_SPN_NAME_TYPE, serviceclass: Param1, servicename: Param2, instanceport: u16, cinstancenames: u16, pinstancenames: *const super::super::Foundation::PSTR, pinstanceports: *const u16, pcspn: *mut u32, prpszspn: *mut *mut super::super::Foundation::PSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetSpnA(servicetype: DS_SPN_NAME_TYPE, serviceclass: super::super::Foundation::PSTR, servicename: super::super::Foundation::PSTR, instanceport: u16, cinstancenames: u16, pinstancenames: *const super::super::Foundation::PSTR, pinstanceports: *const u16, pcspn: *mut u32, prpszspn: *mut *mut super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(DsGetSpnA( ::core::mem::transmute(servicetype), serviceclass.into_param().abi(), servicename.into_param().abi(), ::core::mem::transmute(instanceport), ::core::mem::transmute(cinstancenames), ::core::mem::transmute(pinstancenames), ::core::mem::transmute(pinstanceports), ::core::mem::transmute(pcspn), ::core::mem::transmute(prpszspn), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsGetSpnW<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(servicetype: DS_SPN_NAME_TYPE, serviceclass: Param1, servicename: Param2, instanceport: u16, cinstancenames: u16, pinstancenames: *const super::super::Foundation::PWSTR, pinstanceports: *const u16, pcspn: *mut u32, prpszspn: *mut *mut super::super::Foundation::PWSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsGetSpnW(servicetype: DS_SPN_NAME_TYPE, serviceclass: super::super::Foundation::PWSTR, servicename: super::super::Foundation::PWSTR, instanceport: u16, cinstancenames: u16, pinstancenames: *const super::super::Foundation::PWSTR, pinstanceports: *const u16, pcspn: *mut u32, prpszspn: *mut *mut super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsGetSpnW( ::core::mem::transmute(servicetype), serviceclass.into_param().abi(), servicename.into_param().abi(), ::core::mem::transmute(instanceport), ::core::mem::transmute(cinstancenames), ::core::mem::transmute(pinstancenames), ::core::mem::transmute(pinstanceports), ::core::mem::transmute(pcspn), ::core::mem::transmute(prpszspn), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsInheritSecurityIdentityA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hds: Param0, flags: u32, srcprincipal: Param2, dstprincipal: Param3) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsInheritSecurityIdentityA(hds: super::super::Foundation::HANDLE, flags: u32, srcprincipal: super::super::Foundation::PSTR, dstprincipal: super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(DsInheritSecurityIdentityA(hds.into_param().abi(), ::core::mem::transmute(flags), srcprincipal.into_param().abi(), dstprincipal.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsInheritSecurityIdentityW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hds: Param0, flags: u32, srcprincipal: Param2, dstprincipal: Param3) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsInheritSecurityIdentityW(hds: super::super::Foundation::HANDLE, flags: u32, srcprincipal: super::super::Foundation::PWSTR, dstprincipal: super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsInheritSecurityIdentityW(hds.into_param().abi(), ::core::mem::transmute(flags), srcprincipal.into_param().abi(), dstprincipal.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsIsMangledDnA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pszdn: Param0, edsmanglefor: DS_MANGLE_FOR) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsIsMangledDnA(pszdn: super::super::Foundation::PSTR, edsmanglefor: DS_MANGLE_FOR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(DsIsMangledDnA(pszdn.into_param().abi(), ::core::mem::transmute(edsmanglefor))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsIsMangledDnW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pszdn: Param0, edsmanglefor: DS_MANGLE_FOR) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsIsMangledDnW(pszdn: super::super::Foundation::PWSTR, edsmanglefor: DS_MANGLE_FOR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(DsIsMangledDnW(pszdn.into_param().abi(), ::core::mem::transmute(edsmanglefor))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsIsMangledRdnValueA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pszrdn: Param0, crdn: u32, edsmanglefordesired: DS_MANGLE_FOR) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsIsMangledRdnValueA(pszrdn: super::super::Foundation::PSTR, crdn: u32, edsmanglefordesired: DS_MANGLE_FOR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(DsIsMangledRdnValueA(pszrdn.into_param().abi(), ::core::mem::transmute(crdn), ::core::mem::transmute(edsmanglefordesired))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsIsMangledRdnValueW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pszrdn: Param0, crdn: u32, edsmanglefordesired: DS_MANGLE_FOR) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsIsMangledRdnValueW(pszrdn: super::super::Foundation::PWSTR, crdn: u32, edsmanglefordesired: DS_MANGLE_FOR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(DsIsMangledRdnValueW(pszrdn.into_param().abi(), ::core::mem::transmute(crdn), ::core::mem::transmute(edsmanglefordesired))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsListDomainsInSiteA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hds: Param0, site: Param1, ppdomains: *mut *mut DS_NAME_RESULTA) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsListDomainsInSiteA(hds: super::super::Foundation::HANDLE, site: super::super::Foundation::PSTR, ppdomains: *mut *mut DS_NAME_RESULTA) -> u32; } ::core::mem::transmute(DsListDomainsInSiteA(hds.into_param().abi(), site.into_param().abi(), ::core::mem::transmute(ppdomains))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsListDomainsInSiteW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hds: Param0, site: Param1, ppdomains: *mut *mut DS_NAME_RESULTW) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsListDomainsInSiteW(hds: super::super::Foundation::HANDLE, site: super::super::Foundation::PWSTR, ppdomains: *mut *mut DS_NAME_RESULTW) -> u32; } ::core::mem::transmute(DsListDomainsInSiteW(hds.into_param().abi(), site.into_param().abi(), ::core::mem::transmute(ppdomains))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsListInfoForServerA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hds: Param0, server: Param1, ppinfo: *mut *mut DS_NAME_RESULTA) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsListInfoForServerA(hds: super::super::Foundation::HANDLE, server: super::super::Foundation::PSTR, ppinfo: *mut *mut DS_NAME_RESULTA) -> u32; } ::core::mem::transmute(DsListInfoForServerA(hds.into_param().abi(), server.into_param().abi(), ::core::mem::transmute(ppinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsListInfoForServerW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hds: Param0, server: Param1, ppinfo: *mut *mut DS_NAME_RESULTW) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsListInfoForServerW(hds: super::super::Foundation::HANDLE, server: super::super::Foundation::PWSTR, ppinfo: *mut *mut DS_NAME_RESULTW) -> u32; } ::core::mem::transmute(DsListInfoForServerW(hds.into_param().abi(), server.into_param().abi(), ::core::mem::transmute(ppinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsListRolesA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>>(hds: Param0, pproles: *mut *mut DS_NAME_RESULTA) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsListRolesA(hds: super::super::Foundation::HANDLE, pproles: *mut *mut DS_NAME_RESULTA) -> u32; } ::core::mem::transmute(DsListRolesA(hds.into_param().abi(), ::core::mem::transmute(pproles))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsListRolesW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>>(hds: Param0, pproles: *mut *mut DS_NAME_RESULTW) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsListRolesW(hds: super::super::Foundation::HANDLE, pproles: *mut *mut DS_NAME_RESULTW) -> u32; } ::core::mem::transmute(DsListRolesW(hds.into_param().abi(), ::core::mem::transmute(pproles))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsListServersForDomainInSiteA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hds: Param0, domain: Param1, site: Param2, ppservers: *mut *mut DS_NAME_RESULTA) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsListServersForDomainInSiteA(hds: super::super::Foundation::HANDLE, domain: super::super::Foundation::PSTR, site: super::super::Foundation::PSTR, ppservers: *mut *mut DS_NAME_RESULTA) -> u32; } ::core::mem::transmute(DsListServersForDomainInSiteA(hds.into_param().abi(), domain.into_param().abi(), site.into_param().abi(), ::core::mem::transmute(ppservers))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsListServersForDomainInSiteW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hds: Param0, domain: Param1, site: Param2, ppservers: *mut *mut DS_NAME_RESULTW) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsListServersForDomainInSiteW(hds: super::super::Foundation::HANDLE, domain: super::super::Foundation::PWSTR, site: super::super::Foundation::PWSTR, ppservers: *mut *mut DS_NAME_RESULTW) -> u32; } ::core::mem::transmute(DsListServersForDomainInSiteW(hds.into_param().abi(), domain.into_param().abi(), site.into_param().abi(), ::core::mem::transmute(ppservers))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsListServersInSiteA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hds: Param0, site: Param1, ppservers: *mut *mut DS_NAME_RESULTA) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsListServersInSiteA(hds: super::super::Foundation::HANDLE, site: super::super::Foundation::PSTR, ppservers: *mut *mut DS_NAME_RESULTA) -> u32; } ::core::mem::transmute(DsListServersInSiteA(hds.into_param().abi(), site.into_param().abi(), ::core::mem::transmute(ppservers))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsListServersInSiteW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hds: Param0, site: Param1, ppservers: *mut *mut DS_NAME_RESULTW) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsListServersInSiteW(hds: super::super::Foundation::HANDLE, site: super::super::Foundation::PWSTR, ppservers: *mut *mut DS_NAME_RESULTW) -> u32; } ::core::mem::transmute(DsListServersInSiteW(hds.into_param().abi(), site.into_param().abi(), ::core::mem::transmute(ppservers))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsListSitesA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>>(hds: Param0, ppsites: *mut *mut DS_NAME_RESULTA) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsListSitesA(hds: super::super::Foundation::HANDLE, ppsites: *mut *mut DS_NAME_RESULTA) -> u32; } ::core::mem::transmute(DsListSitesA(hds.into_param().abi(), ::core::mem::transmute(ppsites))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsListSitesW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>>(hds: Param0, ppsites: *mut *mut DS_NAME_RESULTW) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsListSitesW(hds: super::super::Foundation::HANDLE, ppsites: *mut *mut DS_NAME_RESULTW) -> u32; } ::core::mem::transmute(DsListSitesW(hds.into_param().abi(), ::core::mem::transmute(ppsites))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsMakePasswordCredentialsA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(user: Param0, domain: Param1, password: Param2, pauthidentity: *mut *mut ::core::ffi::c_void) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsMakePasswordCredentialsA(user: super::super::Foundation::PSTR, domain: super::super::Foundation::PSTR, password: super::super::Foundation::PSTR, pauthidentity: *mut *mut ::core::ffi::c_void) -> u32; } ::core::mem::transmute(DsMakePasswordCredentialsA(user.into_param().abi(), domain.into_param().abi(), password.into_param().abi(), ::core::mem::transmute(pauthidentity))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsMakePasswordCredentialsW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(user: Param0, domain: Param1, password: Param2, pauthidentity: *mut *mut ::core::ffi::c_void) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsMakePasswordCredentialsW(user: super::super::Foundation::PWSTR, domain: super::super::Foundation::PWSTR, password: super::super::Foundation::PWSTR, pauthidentity: *mut *mut ::core::ffi::c_void) -> u32; } ::core::mem::transmute(DsMakePasswordCredentialsW(user.into_param().abi(), domain.into_param().abi(), password.into_param().abi(), ::core::mem::transmute(pauthidentity))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsMakeSpnA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(serviceclass: Param0, servicename: Param1, instancename: Param2, instanceport: u16, referrer: Param4, pcspnlength: *mut u32, pszspn: super::super::Foundation::PSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsMakeSpnA(serviceclass: super::super::Foundation::PSTR, servicename: super::super::Foundation::PSTR, instancename: super::super::Foundation::PSTR, instanceport: u16, referrer: super::super::Foundation::PSTR, pcspnlength: *mut u32, pszspn: super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(DsMakeSpnA(serviceclass.into_param().abi(), servicename.into_param().abi(), instancename.into_param().abi(), ::core::mem::transmute(instanceport), referrer.into_param().abi(), ::core::mem::transmute(pcspnlength), ::core::mem::transmute(pszspn))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsMakeSpnW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(serviceclass: Param0, servicename: Param1, instancename: Param2, instanceport: u16, referrer: Param4, pcspnlength: *mut u32, pszspn: super::super::Foundation::PWSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsMakeSpnW(serviceclass: super::super::Foundation::PWSTR, servicename: super::super::Foundation::PWSTR, instancename: super::super::Foundation::PWSTR, instanceport: u16, referrer: super::super::Foundation::PWSTR, pcspnlength: *mut u32, pszspn: super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsMakeSpnW(serviceclass.into_param().abi(), servicename.into_param().abi(), instancename.into_param().abi(), ::core::mem::transmute(instanceport), referrer.into_param().abi(), ::core::mem::transmute(pcspnlength), ::core::mem::transmute(pszspn))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsMapSchemaGuidsA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>>(hds: Param0, cguids: u32, rguids: *const ::windows::core::GUID, ppguidmap: *mut *mut DS_SCHEMA_GUID_MAPA) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsMapSchemaGuidsA(hds: super::super::Foundation::HANDLE, cguids: u32, rguids: *const ::windows::core::GUID, ppguidmap: *mut *mut DS_SCHEMA_GUID_MAPA) -> u32; } ::core::mem::transmute(DsMapSchemaGuidsA(hds.into_param().abi(), ::core::mem::transmute(cguids), ::core::mem::transmute(rguids), ::core::mem::transmute(ppguidmap))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsMapSchemaGuidsW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>>(hds: Param0, cguids: u32, rguids: *const ::windows::core::GUID, ppguidmap: *mut *mut DS_SCHEMA_GUID_MAPW) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsMapSchemaGuidsW(hds: super::super::Foundation::HANDLE, cguids: u32, rguids: *const ::windows::core::GUID, ppguidmap: *mut *mut DS_SCHEMA_GUID_MAPW) -> u32; } ::core::mem::transmute(DsMapSchemaGuidsW(hds.into_param().abi(), ::core::mem::transmute(cguids), ::core::mem::transmute(rguids), ::core::mem::transmute(ppguidmap))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Authentication_Identity"))] #[inline] pub unsafe fn DsMergeForestTrustInformationW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(domainname: Param0, newforesttrustinfo: *const super::super::Security::Authentication::Identity::LSA_FOREST_TRUST_INFORMATION, oldforesttrustinfo: *const super::super::Security::Authentication::Identity::LSA_FOREST_TRUST_INFORMATION, mergedforesttrustinfo: *mut *mut super::super::Security::Authentication::Identity::LSA_FOREST_TRUST_INFORMATION) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsMergeForestTrustInformationW(domainname: super::super::Foundation::PWSTR, newforesttrustinfo: *const super::super::Security::Authentication::Identity::LSA_FOREST_TRUST_INFORMATION, oldforesttrustinfo: *const super::super::Security::Authentication::Identity::LSA_FOREST_TRUST_INFORMATION, mergedforesttrustinfo: *mut *mut super::super::Security::Authentication::Identity::LSA_FOREST_TRUST_INFORMATION) -> u32; } ::core::mem::transmute(DsMergeForestTrustInformationW(domainname.into_param().abi(), ::core::mem::transmute(newforesttrustinfo), ::core::mem::transmute(oldforesttrustinfo), ::core::mem::transmute(mergedforesttrustinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsQuerySitesByCostA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hds: Param0, pszfromsite: Param1, rgsztosites: *const super::super::Foundation::PSTR, ctosites: u32, dwflags: u32, prgsiteinfo: *mut *mut DS_SITE_COST_INFO) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsQuerySitesByCostA(hds: super::super::Foundation::HANDLE, pszfromsite: super::super::Foundation::PSTR, rgsztosites: *const super::super::Foundation::PSTR, ctosites: u32, dwflags: u32, prgsiteinfo: *mut *mut DS_SITE_COST_INFO) -> u32; } ::core::mem::transmute(DsQuerySitesByCostA(hds.into_param().abi(), pszfromsite.into_param().abi(), ::core::mem::transmute(rgsztosites), ::core::mem::transmute(ctosites), ::core::mem::transmute(dwflags), ::core::mem::transmute(prgsiteinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsQuerySitesByCostW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hds: Param0, pwszfromsite: Param1, rgwsztosites: *const super::super::Foundation::PWSTR, ctosites: u32, dwflags: u32, prgsiteinfo: *mut *mut DS_SITE_COST_INFO) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsQuerySitesByCostW(hds: super::super::Foundation::HANDLE, pwszfromsite: super::super::Foundation::PWSTR, rgwsztosites: *const super::super::Foundation::PWSTR, ctosites: u32, dwflags: u32, prgsiteinfo: *mut *mut DS_SITE_COST_INFO) -> u32; } ::core::mem::transmute(DsQuerySitesByCostW(hds.into_param().abi(), pwszfromsite.into_param().abi(), ::core::mem::transmute(rgwsztosites), ::core::mem::transmute(ctosites), ::core::mem::transmute(dwflags), ::core::mem::transmute(prgsiteinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn DsQuerySitesFree(rgsiteinfo: *const DS_SITE_COST_INFO) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsQuerySitesFree(rgsiteinfo: *const DS_SITE_COST_INFO); } ::core::mem::transmute(DsQuerySitesFree(::core::mem::transmute(rgsiteinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsQuoteRdnValueA<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(cunquotedrdnvaluelength: u32, psunquotedrdnvalue: Param1, pcquotedrdnvaluelength: *mut u32, psquotedrdnvalue: super::super::Foundation::PSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsQuoteRdnValueA(cunquotedrdnvaluelength: u32, psunquotedrdnvalue: super::super::Foundation::PSTR, pcquotedrdnvaluelength: *mut u32, psquotedrdnvalue: super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(DsQuoteRdnValueA(::core::mem::transmute(cunquotedrdnvaluelength), psunquotedrdnvalue.into_param().abi(), ::core::mem::transmute(pcquotedrdnvaluelength), ::core::mem::transmute(psquotedrdnvalue))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsQuoteRdnValueW<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(cunquotedrdnvaluelength: u32, psunquotedrdnvalue: Param1, pcquotedrdnvaluelength: *mut u32, psquotedrdnvalue: super::super::Foundation::PWSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsQuoteRdnValueW(cunquotedrdnvaluelength: u32, psunquotedrdnvalue: super::super::Foundation::PWSTR, pcquotedrdnvaluelength: *mut u32, psquotedrdnvalue: super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsQuoteRdnValueW(::core::mem::transmute(cunquotedrdnvaluelength), psunquotedrdnvalue.into_param().abi(), ::core::mem::transmute(pcquotedrdnvaluelength), ::core::mem::transmute(psquotedrdnvalue))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsRemoveDsDomainA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hds: Param0, domaindn: Param1) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsRemoveDsDomainA(hds: super::super::Foundation::HANDLE, domaindn: super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(DsRemoveDsDomainA(hds.into_param().abi(), domaindn.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsRemoveDsDomainW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hds: Param0, domaindn: Param1) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsRemoveDsDomainW(hds: super::super::Foundation::HANDLE, domaindn: super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsRemoveDsDomainW(hds.into_param().abi(), domaindn.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsRemoveDsServerA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>>(hds: Param0, serverdn: Param1, domaindn: Param2, flastdcindomain: *mut super::super::Foundation::BOOL, fcommit: Param4) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsRemoveDsServerA(hds: super::super::Foundation::HANDLE, serverdn: super::super::Foundation::PSTR, domaindn: super::super::Foundation::PSTR, flastdcindomain: *mut super::super::Foundation::BOOL, fcommit: super::super::Foundation::BOOL) -> u32; } ::core::mem::transmute(DsRemoveDsServerA(hds.into_param().abi(), serverdn.into_param().abi(), domaindn.into_param().abi(), ::core::mem::transmute(flastdcindomain), fcommit.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsRemoveDsServerW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>>(hds: Param0, serverdn: Param1, domaindn: Param2, flastdcindomain: *mut super::super::Foundation::BOOL, fcommit: Param4) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsRemoveDsServerW(hds: super::super::Foundation::HANDLE, serverdn: super::super::Foundation::PWSTR, domaindn: super::super::Foundation::PWSTR, flastdcindomain: *mut super::super::Foundation::BOOL, fcommit: super::super::Foundation::BOOL) -> u32; } ::core::mem::transmute(DsRemoveDsServerW(hds.into_param().abi(), serverdn.into_param().abi(), domaindn.into_param().abi(), ::core::mem::transmute(flastdcindomain), fcommit.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsReplicaAddA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>( hds: Param0, namecontext: Param1, sourcedsadn: Param2, transportdn: Param3, sourcedsaaddress: Param4, pschedule: *const SCHEDULE, options: u32, ) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaAddA(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PSTR, sourcedsadn: super::super::Foundation::PSTR, transportdn: super::super::Foundation::PSTR, sourcedsaaddress: super::super::Foundation::PSTR, pschedule: *const SCHEDULE, options: u32) -> u32; } ::core::mem::transmute(DsReplicaAddA(hds.into_param().abi(), namecontext.into_param().abi(), sourcedsadn.into_param().abi(), transportdn.into_param().abi(), sourcedsaaddress.into_param().abi(), ::core::mem::transmute(pschedule), ::core::mem::transmute(options))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsReplicaAddW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>( hds: Param0, namecontext: Param1, sourcedsadn: Param2, transportdn: Param3, sourcedsaaddress: Param4, pschedule: *const SCHEDULE, options: u32, ) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaAddW(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PWSTR, sourcedsadn: super::super::Foundation::PWSTR, transportdn: super::super::Foundation::PWSTR, sourcedsaaddress: super::super::Foundation::PWSTR, pschedule: *const SCHEDULE, options: u32) -> u32; } ::core::mem::transmute(DsReplicaAddW(hds.into_param().abi(), namecontext.into_param().abi(), sourcedsadn.into_param().abi(), transportdn.into_param().abi(), sourcedsaaddress.into_param().abi(), ::core::mem::transmute(pschedule), ::core::mem::transmute(options))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsReplicaConsistencyCheck<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>>(hds: Param0, taskid: DS_KCC_TASKID, dwflags: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaConsistencyCheck(hds: super::super::Foundation::HANDLE, taskid: DS_KCC_TASKID, dwflags: u32) -> u32; } ::core::mem::transmute(DsReplicaConsistencyCheck(hds.into_param().abi(), ::core::mem::transmute(taskid), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsReplicaDelA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hds: Param0, namecontext: Param1, dsasrc: Param2, options: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaDelA(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PSTR, dsasrc: super::super::Foundation::PSTR, options: u32) -> u32; } ::core::mem::transmute(DsReplicaDelA(hds.into_param().abi(), namecontext.into_param().abi(), dsasrc.into_param().abi(), ::core::mem::transmute(options))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsReplicaDelW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hds: Param0, namecontext: Param1, dsasrc: Param2, options: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaDelW(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PWSTR, dsasrc: super::super::Foundation::PWSTR, options: u32) -> u32; } ::core::mem::transmute(DsReplicaDelW(hds.into_param().abi(), namecontext.into_param().abi(), dsasrc.into_param().abi(), ::core::mem::transmute(options))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn DsReplicaFreeInfo(infotype: DS_REPL_INFO_TYPE, pinfo: *const ::core::ffi::c_void) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaFreeInfo(infotype: DS_REPL_INFO_TYPE, pinfo: *const ::core::ffi::c_void); } ::core::mem::transmute(DsReplicaFreeInfo(::core::mem::transmute(infotype), ::core::mem::transmute(pinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsReplicaGetInfo2W<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>( hds: Param0, infotype: DS_REPL_INFO_TYPE, pszobject: Param2, puuidforsourcedsaobjguid: *const ::windows::core::GUID, pszattributename: Param4, pszvalue: Param5, dwflags: u32, dwenumerationcontext: u32, ppinfo: *mut *mut ::core::ffi::c_void, ) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaGetInfo2W(hds: super::super::Foundation::HANDLE, infotype: DS_REPL_INFO_TYPE, pszobject: super::super::Foundation::PWSTR, puuidforsourcedsaobjguid: *const ::windows::core::GUID, pszattributename: super::super::Foundation::PWSTR, pszvalue: super::super::Foundation::PWSTR, dwflags: u32, dwenumerationcontext: u32, ppinfo: *mut *mut ::core::ffi::c_void) -> u32; } ::core::mem::transmute(DsReplicaGetInfo2W( hds.into_param().abi(), ::core::mem::transmute(infotype), pszobject.into_param().abi(), ::core::mem::transmute(puuidforsourcedsaobjguid), pszattributename.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(dwenumerationcontext), ::core::mem::transmute(ppinfo), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsReplicaGetInfoW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hds: Param0, infotype: DS_REPL_INFO_TYPE, pszobject: Param2, puuidforsourcedsaobjguid: *const ::windows::core::GUID, ppinfo: *mut *mut ::core::ffi::c_void) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaGetInfoW(hds: super::super::Foundation::HANDLE, infotype: DS_REPL_INFO_TYPE, pszobject: super::super::Foundation::PWSTR, puuidforsourcedsaobjguid: *const ::windows::core::GUID, ppinfo: *mut *mut ::core::ffi::c_void) -> u32; } ::core::mem::transmute(DsReplicaGetInfoW(hds.into_param().abi(), ::core::mem::transmute(infotype), pszobject.into_param().abi(), ::core::mem::transmute(puuidforsourcedsaobjguid), ::core::mem::transmute(ppinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsReplicaModifyA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>( hds: Param0, namecontext: Param1, puuidsourcedsa: *const ::windows::core::GUID, transportdn: Param3, sourcedsaaddress: Param4, pschedule: *const SCHEDULE, replicaflags: u32, modifyfields: u32, options: u32, ) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaModifyA(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PSTR, puuidsourcedsa: *const ::windows::core::GUID, transportdn: super::super::Foundation::PSTR, sourcedsaaddress: super::super::Foundation::PSTR, pschedule: *const SCHEDULE, replicaflags: u32, modifyfields: u32, options: u32) -> u32; } ::core::mem::transmute(DsReplicaModifyA( hds.into_param().abi(), namecontext.into_param().abi(), ::core::mem::transmute(puuidsourcedsa), transportdn.into_param().abi(), sourcedsaaddress.into_param().abi(), ::core::mem::transmute(pschedule), ::core::mem::transmute(replicaflags), ::core::mem::transmute(modifyfields), ::core::mem::transmute(options), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsReplicaModifyW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>( hds: Param0, namecontext: Param1, puuidsourcedsa: *const ::windows::core::GUID, transportdn: Param3, sourcedsaaddress: Param4, pschedule: *const SCHEDULE, replicaflags: u32, modifyfields: u32, options: u32, ) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaModifyW(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PWSTR, puuidsourcedsa: *const ::windows::core::GUID, transportdn: super::super::Foundation::PWSTR, sourcedsaaddress: super::super::Foundation::PWSTR, pschedule: *const SCHEDULE, replicaflags: u32, modifyfields: u32, options: u32) -> u32; } ::core::mem::transmute(DsReplicaModifyW( hds.into_param().abi(), namecontext.into_param().abi(), ::core::mem::transmute(puuidsourcedsa), transportdn.into_param().abi(), sourcedsaaddress.into_param().abi(), ::core::mem::transmute(pschedule), ::core::mem::transmute(replicaflags), ::core::mem::transmute(modifyfields), ::core::mem::transmute(options), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsReplicaSyncA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hds: Param0, namecontext: Param1, puuiddsasrc: *const ::windows::core::GUID, options: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaSyncA(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PSTR, puuiddsasrc: *const ::windows::core::GUID, options: u32) -> u32; } ::core::mem::transmute(DsReplicaSyncA(hds.into_param().abi(), namecontext.into_param().abi(), ::core::mem::transmute(puuiddsasrc), ::core::mem::transmute(options))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsReplicaSyncAllA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hds: Param0, psznamecontext: Param1, ulflags: u32, pfncallback: isize, pcallbackdata: *const ::core::ffi::c_void, perrors: *mut *mut *mut DS_REPSYNCALL_ERRINFOA) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaSyncAllA(hds: super::super::Foundation::HANDLE, psznamecontext: super::super::Foundation::PSTR, ulflags: u32, pfncallback: isize, pcallbackdata: *const ::core::ffi::c_void, perrors: *mut *mut *mut DS_REPSYNCALL_ERRINFOA) -> u32; } ::core::mem::transmute(DsReplicaSyncAllA(hds.into_param().abi(), psznamecontext.into_param().abi(), ::core::mem::transmute(ulflags), ::core::mem::transmute(pfncallback), ::core::mem::transmute(pcallbackdata), ::core::mem::transmute(perrors))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsReplicaSyncAllW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hds: Param0, psznamecontext: Param1, ulflags: u32, pfncallback: isize, pcallbackdata: *const ::core::ffi::c_void, perrors: *mut *mut *mut DS_REPSYNCALL_ERRINFOW) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaSyncAllW(hds: super::super::Foundation::HANDLE, psznamecontext: super::super::Foundation::PWSTR, ulflags: u32, pfncallback: isize, pcallbackdata: *const ::core::ffi::c_void, perrors: *mut *mut *mut DS_REPSYNCALL_ERRINFOW) -> u32; } ::core::mem::transmute(DsReplicaSyncAllW(hds.into_param().abi(), psznamecontext.into_param().abi(), ::core::mem::transmute(ulflags), ::core::mem::transmute(pfncallback), ::core::mem::transmute(pcallbackdata), ::core::mem::transmute(perrors))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsReplicaSyncW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hds: Param0, namecontext: Param1, puuiddsasrc: *const ::windows::core::GUID, options: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaSyncW(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PWSTR, puuiddsasrc: *const ::windows::core::GUID, options: u32) -> u32; } ::core::mem::transmute(DsReplicaSyncW(hds.into_param().abi(), namecontext.into_param().abi(), ::core::mem::transmute(puuiddsasrc), ::core::mem::transmute(options))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsReplicaUpdateRefsA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hds: Param0, namecontext: Param1, dsadest: Param2, puuiddsadest: *const ::windows::core::GUID, options: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaUpdateRefsA(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PSTR, dsadest: super::super::Foundation::PSTR, puuiddsadest: *const ::windows::core::GUID, options: u32) -> u32; } ::core::mem::transmute(DsReplicaUpdateRefsA(hds.into_param().abi(), namecontext.into_param().abi(), dsadest.into_param().abi(), ::core::mem::transmute(puuiddsadest), ::core::mem::transmute(options))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsReplicaUpdateRefsW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hds: Param0, namecontext: Param1, dsadest: Param2, puuiddsadest: *const ::windows::core::GUID, options: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaUpdateRefsW(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PWSTR, dsadest: super::super::Foundation::PWSTR, puuiddsadest: *const ::windows::core::GUID, options: u32) -> u32; } ::core::mem::transmute(DsReplicaUpdateRefsW(hds.into_param().abi(), namecontext.into_param().abi(), dsadest.into_param().abi(), ::core::mem::transmute(puuiddsadest), ::core::mem::transmute(options))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsReplicaVerifyObjectsA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hds: Param0, namecontext: Param1, puuiddsasrc: *const ::windows::core::GUID, uloptions: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaVerifyObjectsA(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PSTR, puuiddsasrc: *const ::windows::core::GUID, uloptions: u32) -> u32; } ::core::mem::transmute(DsReplicaVerifyObjectsA(hds.into_param().abi(), namecontext.into_param().abi(), ::core::mem::transmute(puuiddsasrc), ::core::mem::transmute(uloptions))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsReplicaVerifyObjectsW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hds: Param0, namecontext: Param1, puuiddsasrc: *const ::windows::core::GUID, uloptions: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsReplicaVerifyObjectsW(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PWSTR, puuiddsasrc: *const ::windows::core::GUID, uloptions: u32) -> u32; } ::core::mem::transmute(DsReplicaVerifyObjectsW(hds.into_param().abi(), namecontext.into_param().abi(), ::core::mem::transmute(puuiddsasrc), ::core::mem::transmute(uloptions))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn DsRoleFreeMemory(buffer: *mut ::core::ffi::c_void) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsRoleFreeMemory(buffer: *mut ::core::ffi::c_void); } ::core::mem::transmute(DsRoleFreeMemory(::core::mem::transmute(buffer))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsRoleGetPrimaryDomainInformation<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(lpserver: Param0, infolevel: DSROLE_PRIMARY_DOMAIN_INFO_LEVEL, buffer: *mut *mut u8) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsRoleGetPrimaryDomainInformation(lpserver: super::super::Foundation::PWSTR, infolevel: DSROLE_PRIMARY_DOMAIN_INFO_LEVEL, buffer: *mut *mut u8) -> u32; } ::core::mem::transmute(DsRoleGetPrimaryDomainInformation(lpserver.into_param().abi(), ::core::mem::transmute(infolevel), ::core::mem::transmute(buffer))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsServerRegisterSpnA<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(operation: DS_SPN_WRITE_OP, serviceclass: Param1, userobjectdn: Param2) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsServerRegisterSpnA(operation: DS_SPN_WRITE_OP, serviceclass: super::super::Foundation::PSTR, userobjectdn: super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(DsServerRegisterSpnA(::core::mem::transmute(operation), serviceclass.into_param().abi(), userobjectdn.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsServerRegisterSpnW<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(operation: DS_SPN_WRITE_OP, serviceclass: Param1, userobjectdn: Param2) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsServerRegisterSpnW(operation: DS_SPN_WRITE_OP, serviceclass: super::super::Foundation::PWSTR, userobjectdn: super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsServerRegisterSpnW(::core::mem::transmute(operation), serviceclass.into_param().abi(), userobjectdn.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsUnBindA(phds: *const super::super::Foundation::HANDLE) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsUnBindA(phds: *const super::super::Foundation::HANDLE) -> u32; } ::core::mem::transmute(DsUnBindA(::core::mem::transmute(phds))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsUnBindW(phds: *const super::super::Foundation::HANDLE) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsUnBindW(phds: *const super::super::Foundation::HANDLE) -> u32; } ::core::mem::transmute(DsUnBindW(::core::mem::transmute(phds))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsUnquoteRdnValueA<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(cquotedrdnvaluelength: u32, psquotedrdnvalue: Param1, pcunquotedrdnvaluelength: *mut u32, psunquotedrdnvalue: super::super::Foundation::PSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsUnquoteRdnValueA(cquotedrdnvaluelength: u32, psquotedrdnvalue: super::super::Foundation::PSTR, pcunquotedrdnvaluelength: *mut u32, psunquotedrdnvalue: super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(DsUnquoteRdnValueA(::core::mem::transmute(cquotedrdnvaluelength), psquotedrdnvalue.into_param().abi(), ::core::mem::transmute(pcunquotedrdnvaluelength), ::core::mem::transmute(psunquotedrdnvalue))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsUnquoteRdnValueW<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(cquotedrdnvaluelength: u32, psquotedrdnvalue: Param1, pcunquotedrdnvaluelength: *mut u32, psunquotedrdnvalue: super::super::Foundation::PWSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsUnquoteRdnValueW(cquotedrdnvaluelength: u32, psquotedrdnvalue: super::super::Foundation::PWSTR, pcunquotedrdnvaluelength: *mut u32, psunquotedrdnvalue: super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsUnquoteRdnValueW(::core::mem::transmute(cquotedrdnvaluelength), psquotedrdnvalue.into_param().abi(), ::core::mem::transmute(pcunquotedrdnvaluelength), ::core::mem::transmute(psunquotedrdnvalue))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsValidateSubnetNameA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(subnetname: Param0) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsValidateSubnetNameA(subnetname: super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(DsValidateSubnetNameA(subnetname.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsValidateSubnetNameW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(subnetname: Param0) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsValidateSubnetNameW(subnetname: super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsValidateSubnetNameW(subnetname.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsWriteAccountSpnA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hds: Param0, operation: DS_SPN_WRITE_OP, pszaccount: Param2, cspn: u32, rpszspn: *const super::super::Foundation::PSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsWriteAccountSpnA(hds: super::super::Foundation::HANDLE, operation: DS_SPN_WRITE_OP, pszaccount: super::super::Foundation::PSTR, cspn: u32, rpszspn: *const super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(DsWriteAccountSpnA(hds.into_param().abi(), ::core::mem::transmute(operation), pszaccount.into_param().abi(), ::core::mem::transmute(cspn), ::core::mem::transmute(rpszspn))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsWriteAccountSpnW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hds: Param0, operation: DS_SPN_WRITE_OP, pszaccount: Param2, cspn: u32, rpszspn: *const super::super::Foundation::PWSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DsWriteAccountSpnW(hds: super::super::Foundation::HANDLE, operation: DS_SPN_WRITE_OP, pszaccount: super::super::Foundation::PWSTR, cspn: u32, rpszspn: *const super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(DsWriteAccountSpnW(hds.into_param().abi(), ::core::mem::transmute(operation), pszaccount.into_param().abi(), ::core::mem::transmute(cspn), ::core::mem::transmute(rpszspn))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const Email: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8f92a857_478e_11d1_a3b4_00c04fb950dc); pub const FACILITY_BACKUP: u32 = 2047u32; pub const FACILITY_NTDSB: u32 = 2048u32; pub const FACILITY_SYSTEM: u32 = 0u32; pub const FLAG_DISABLABLE_OPTIONAL_FEATURE: u32 = 4u32; pub const FLAG_DOMAIN_OPTIONAL_FEATURE: u32 = 2u32; pub const FLAG_FOREST_OPTIONAL_FEATURE: u32 = 1u32; pub const FLAG_SERVER_OPTIONAL_FEATURE: u32 = 8u32; pub const FRSCONN_MAX_PRIORITY: u32 = 8u32; pub const FRSCONN_PRIORITY_MASK: u32 = 1879048192u32; pub const FaxNumber: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa5062215_4681_11d1_a3b4_00c04fb950dc); #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn FreeADsMem(pmem: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn FreeADsMem(pmem: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(FreeADsMem(::core::mem::transmute(pmem))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn FreeADsStr<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pstr: Param0) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn FreeADsStr(pstr: super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(FreeADsStr(pstr.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy, :: core :: fmt :: Debug, :: core :: cmp :: PartialEq, :: core :: cmp :: Eq)] #[repr(transparent)] pub struct GetDcContextHandle(pub isize); impl ::core::default::Default for GetDcContextHandle { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } unsafe impl ::windows::core::Handle for GetDcContextHandle {} unsafe impl ::windows::core::Abi for GetDcContextHandle { type Abi = Self; } pub const Hold: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb3ad3e13_4080_11d1_a3ac_00c04fb950dc); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADs(pub ::windows::core::IUnknown); impl IADs { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } } unsafe impl ::windows::core::Interface for IADs { type Vtable = IADs_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfd8256d0_fd15_11ce_abc4_02608c9e7553); } impl ::core::convert::From<IADs> for ::windows::core::IUnknown { fn from(value: IADs) -> Self { value.0 } } impl ::core::convert::From<&IADs> for ::windows::core::IUnknown { fn from(value: &IADs) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADs { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADs> for super::super::System::Com::IDispatch { fn from(value: IADs) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADs> for super::super::System::Com::IDispatch { fn from(value: &IADs) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADs { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADs { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADs_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsADSystemInfo(pub ::windows::core::IUnknown); impl IADsADSystemInfo { #[cfg(feature = "Win32_Foundation")] pub unsafe fn UserName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ComputerName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SiteName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DomainShortName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DomainDNSName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ForestDNSName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PDCRoleOwner(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SchemaRoleOwner(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn IsNativeMode(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetAnyDCName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetDCSiteName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, szserver: Param0) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), szserver.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn RefreshSchemaCache(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetTrees(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } } unsafe impl ::windows::core::Interface for IADsADSystemInfo { type Vtable = IADsADSystemInfo_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5bb11929_afd1_11d2_9cb9_0000f87a369e); } impl ::core::convert::From<IADsADSystemInfo> for ::windows::core::IUnknown { fn from(value: IADsADSystemInfo) -> Self { value.0 } } impl ::core::convert::From<&IADsADSystemInfo> for ::windows::core::IUnknown { fn from(value: &IADsADSystemInfo) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsADSystemInfo { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsADSystemInfo { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsADSystemInfo> for super::super::System::Com::IDispatch { fn from(value: IADsADSystemInfo) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsADSystemInfo> for super::super::System::Com::IDispatch { fn from(value: &IADsADSystemInfo) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsADSystemInfo { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsADSystemInfo { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsADSystemInfo_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i16) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszdcname: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, szserver: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pszsitename: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvtrees: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsAccessControlEntry(pub ::windows::core::IUnknown); impl IADsAccessControlEntry { pub unsafe fn AccessMask(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAccessMask(&self, lnaccessmask: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnaccessmask)).ok() } pub unsafe fn AceType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAceType(&self, lnacetype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnacetype)).ok() } pub unsafe fn AceFlags(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAceFlags(&self, lnaceflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnaceflags)).ok() } pub unsafe fn Flags(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetFlags(&self, lnflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnflags)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ObjectType(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetObjectType<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrobjecttype: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrobjecttype.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn InheritedObjectType(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetInheritedObjectType<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrinheritedobjecttype: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), bstrinheritedobjecttype.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Trustee(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetTrustee<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrtrustee: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), bstrtrustee.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsAccessControlEntry { type Vtable = IADsAccessControlEntry_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb4f3a14c_9bdd_11d0_852c_00c04fd8d503); } impl ::core::convert::From<IADsAccessControlEntry> for ::windows::core::IUnknown { fn from(value: IADsAccessControlEntry) -> Self { value.0 } } impl ::core::convert::From<&IADsAccessControlEntry> for ::windows::core::IUnknown { fn from(value: &IADsAccessControlEntry) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsAccessControlEntry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsAccessControlEntry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsAccessControlEntry> for super::super::System::Com::IDispatch { fn from(value: IADsAccessControlEntry) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsAccessControlEntry> for super::super::System::Com::IDispatch { fn from(value: &IADsAccessControlEntry) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsAccessControlEntry { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsAccessControlEntry { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsAccessControlEntry_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnaccessmask: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnacetype: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnaceflags: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnflags: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrobjecttype: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrinheritedobjecttype: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrtrustee: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsAccessControlList(pub ::windows::core::IUnknown); impl IADsAccessControlList { pub unsafe fn AclRevision(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAclRevision(&self, lnaclrevision: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnaclrevision)).ok() } pub unsafe fn AceCount(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAceCount(&self, lnacecount: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnacecount)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn AddAce<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch>>(&self, paccesscontrolentry: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), paccesscontrolentry.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn RemoveAce<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch>>(&self, paccesscontrolentry: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), paccesscontrolentry.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CopyAccessList(&self) -> ::windows::core::Result<super::super::System::Com::IDispatch> { let mut result__: <super::super::System::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::IDispatch>(result__) } pub unsafe fn _NewEnum(&self) -> ::windows::core::Result<::windows::core::IUnknown> { let mut result__: <::windows::core::IUnknown as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<::windows::core::IUnknown>(result__) } } unsafe impl ::windows::core::Interface for IADsAccessControlList { type Vtable = IADsAccessControlList_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb7ee91cc_9bdd_11d0_852c_00c04fd8d503); } impl ::core::convert::From<IADsAccessControlList> for ::windows::core::IUnknown { fn from(value: IADsAccessControlList) -> Self { value.0 } } impl ::core::convert::From<&IADsAccessControlList> for ::windows::core::IUnknown { fn from(value: &IADsAccessControlList) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsAccessControlList { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsAccessControlList { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsAccessControlList> for super::super::System::Com::IDispatch { fn from(value: IADsAccessControlList) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsAccessControlList> for super::super::System::Com::IDispatch { fn from(value: &IADsAccessControlList) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsAccessControlList { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsAccessControlList { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsAccessControlList_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnaclrevision: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnacecount: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, paccesscontrolentry: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, paccesscontrolentry: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppaccesscontrollist: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsAcl(pub ::windows::core::IUnknown); impl IADsAcl { #[cfg(feature = "Win32_Foundation")] pub unsafe fn ProtectedAttrName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetProtectedAttrName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrprotectedattrname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), bstrprotectedattrname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SubjectName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetSubjectName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrsubjectname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), bstrsubjectname.into_param().abi()).ok() } pub unsafe fn Privileges(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetPrivileges(&self, lnprivileges: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnprivileges)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CopyAcl(&self) -> ::windows::core::Result<super::super::System::Com::IDispatch> { let mut result__: <super::super::System::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IADsAcl { type Vtable = IADsAcl_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8452d3ab_0869_11d1_a377_00c04fb950dc); } impl ::core::convert::From<IADsAcl> for ::windows::core::IUnknown { fn from(value: IADsAcl) -> Self { value.0 } } impl ::core::convert::From<&IADsAcl> for ::windows::core::IUnknown { fn from(value: &IADsAcl) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsAcl { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsAcl { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsAcl> for super::super::System::Com::IDispatch { fn from(value: IADsAcl) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsAcl> for super::super::System::Com::IDispatch { fn from(value: &IADsAcl) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsAcl { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsAcl { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsAcl_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrprotectedattrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrsubjectname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnprivileges: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppacl: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsAggregatee(pub ::windows::core::IUnknown); impl IADsAggregatee { pub unsafe fn ConnectAsAggregatee<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>>(&self, pouterunknown: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pouterunknown.into_param().abi()).ok() } pub unsafe fn DisconnectAsAggregatee(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn RelinquishInterface(&self, riid: *const ::windows::core::GUID) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid)).ok() } pub unsafe fn RestoreInterface(&self, riid: *const ::windows::core::GUID) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid)).ok() } } unsafe impl ::windows::core::Interface for IADsAggregatee { type Vtable = IADsAggregatee_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1346ce8c_9039_11d0_8528_00c04fd8d503); } impl ::core::convert::From<IADsAggregatee> for ::windows::core::IUnknown { fn from(value: IADsAggregatee) -> Self { value.0 } } impl ::core::convert::From<&IADsAggregatee> for ::windows::core::IUnknown { fn from(value: &IADsAggregatee) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsAggregatee { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsAggregatee { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IADsAggregatee_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pouterunknown: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsAggregator(pub ::windows::core::IUnknown); impl IADsAggregator { pub unsafe fn ConnectAsAggregator<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>>(&self, paggregatee: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), paggregatee.into_param().abi()).ok() } pub unsafe fn DisconnectAsAggregator(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IADsAggregator { type Vtable = IADsAggregator_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x52db5fb0_941f_11d0_8529_00c04fd8d503); } impl ::core::convert::From<IADsAggregator> for ::windows::core::IUnknown { fn from(value: IADsAggregator) -> Self { value.0 } } impl ::core::convert::From<&IADsAggregator> for ::windows::core::IUnknown { fn from(value: &IADsAggregator) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsAggregator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsAggregator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IADsAggregator_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, paggregatee: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsBackLink(pub ::windows::core::IUnknown); impl IADsBackLink { pub unsafe fn RemoteID(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetRemoteID(&self, lnremoteid: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnremoteid)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ObjectName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetObjectName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrobjectname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), bstrobjectname.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsBackLink { type Vtable = IADsBackLink_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfd1302bd_4080_11d1_a3ac_00c04fb950dc); } impl ::core::convert::From<IADsBackLink> for ::windows::core::IUnknown { fn from(value: IADsBackLink) -> Self { value.0 } } impl ::core::convert::From<&IADsBackLink> for ::windows::core::IUnknown { fn from(value: &IADsBackLink) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsBackLink { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsBackLink { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsBackLink> for super::super::System::Com::IDispatch { fn from(value: IADsBackLink) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsBackLink> for super::super::System::Com::IDispatch { fn from(value: &IADsBackLink) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsBackLink { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsBackLink { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsBackLink_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnremoteid: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrobjectname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsCaseIgnoreList(pub ::windows::core::IUnknown); impl IADsCaseIgnoreList { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn CaseIgnoreList(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetCaseIgnoreList<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vcaseignorelist: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), vcaseignorelist.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsCaseIgnoreList { type Vtable = IADsCaseIgnoreList_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7b66b533_4680_11d1_a3b4_00c04fb950dc); } impl ::core::convert::From<IADsCaseIgnoreList> for ::windows::core::IUnknown { fn from(value: IADsCaseIgnoreList) -> Self { value.0 } } impl ::core::convert::From<&IADsCaseIgnoreList> for ::windows::core::IUnknown { fn from(value: &IADsCaseIgnoreList) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsCaseIgnoreList { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsCaseIgnoreList { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsCaseIgnoreList> for super::super::System::Com::IDispatch { fn from(value: IADsCaseIgnoreList) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsCaseIgnoreList> for super::super::System::Com::IDispatch { fn from(value: &IADsCaseIgnoreList) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsCaseIgnoreList { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsCaseIgnoreList { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsCaseIgnoreList_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vcaseignorelist: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsClass(pub ::windows::core::IUnknown); impl IADsClass { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PrimaryInterface(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CLSID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetCLSID<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrclsid: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), bstrclsid.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn OID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetOID<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstroid: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), bstroid.into_param().abi()).ok() } pub unsafe fn Abstract(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetAbstract(&self, fabstract: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), ::core::mem::transmute(fabstract)).ok() } pub unsafe fn Auxiliary(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetAuxiliary(&self, fauxiliary: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), ::core::mem::transmute(fauxiliary)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn MandatoryProperties(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetMandatoryProperties<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vmandatoryproperties: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), vmandatoryproperties.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn OptionalProperties(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetOptionalProperties<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, voptionalproperties: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), voptionalproperties.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn NamingProperties(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetNamingProperties<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vnamingproperties: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), vnamingproperties.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn DerivedFrom(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetDerivedFrom<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vderivedfrom: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).36)(::core::mem::transmute_copy(self), vderivedfrom.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn AuxDerivedFrom(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).37)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetAuxDerivedFrom<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vauxderivedfrom: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).38)(::core::mem::transmute_copy(self), vauxderivedfrom.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PossibleSuperiors(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).39)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetPossibleSuperiors<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vpossiblesuperiors: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).40)(::core::mem::transmute_copy(self), vpossiblesuperiors.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Containment(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).41)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetContainment<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vcontainment: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).42)(::core::mem::transmute_copy(self), vcontainment.into_param().abi()).ok() } pub unsafe fn Container(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).43)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetContainer(&self, fcontainer: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).44)(::core::mem::transmute_copy(self), ::core::mem::transmute(fcontainer)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn HelpFileName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).45)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetHelpFileName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrhelpfilename: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).46)(::core::mem::transmute_copy(self), bstrhelpfilename.into_param().abi()).ok() } pub unsafe fn HelpFileContext(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).47)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetHelpFileContext(&self, lnhelpfilecontext: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).48)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnhelpfilecontext)).ok() } pub unsafe fn Qualifiers(&self) -> ::windows::core::Result<IADsCollection> { let mut result__: <IADsCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).49)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IADsCollection>(result__) } } unsafe impl ::windows::core::Interface for IADsClass { type Vtable = IADsClass_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc8f93dd0_4ae0_11cf_9e73_00aa004a5691); } impl ::core::convert::From<IADsClass> for ::windows::core::IUnknown { fn from(value: IADsClass) -> Self { value.0 } } impl ::core::convert::From<&IADsClass> for ::windows::core::IUnknown { fn from(value: &IADsClass) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsClass { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsClass { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsClass> for IADs { fn from(value: IADsClass) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsClass> for IADs { fn from(value: &IADsClass) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsClass { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsClass { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsClass> for super::super::System::Com::IDispatch { fn from(value: IADsClass) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsClass> for super::super::System::Com::IDispatch { fn from(value: &IADsClass) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsClass { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsClass { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsClass_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrclsid: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstroid: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fabstract: i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fauxiliary: i16) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vmandatoryproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, voptionalproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vnamingproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vderivedfrom: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vauxderivedfrom: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vpossiblesuperiors: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vcontainment: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fcontainer: i16) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrhelpfilename: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnhelpfilecontext: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqualifiers: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsCollection(pub ::windows::core::IUnknown); impl IADsCollection { pub unsafe fn _NewEnum(&self) -> ::windows::core::Result<::windows::core::IUnknown> { let mut result__: <::windows::core::IUnknown as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<::windows::core::IUnknown>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Add<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vitem: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vitem.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Remove<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstritemtoberemoved: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), bstritemtoberemoved.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetObject<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } } unsafe impl ::windows::core::Interface for IADsCollection { type Vtable = IADsCollection_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x72b945e0_253b_11cf_a988_00aa006bc149); } impl ::core::convert::From<IADsCollection> for ::windows::core::IUnknown { fn from(value: IADsCollection) -> Self { value.0 } } impl ::core::convert::From<&IADsCollection> for ::windows::core::IUnknown { fn from(value: &IADsCollection) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsCollection> for super::super::System::Com::IDispatch { fn from(value: IADsCollection) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsCollection> for super::super::System::Com::IDispatch { fn from(value: &IADsCollection) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsCollection_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vitem: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstritemtoberemoved: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvitem: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsComputer(pub ::windows::core::IUnknown); impl IADsComputer { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ComputerID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Site(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Description(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDescription<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdescription: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), bstrdescription.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Location(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLocation<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrlocation: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), bstrlocation.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PrimaryUser(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPrimaryUser<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrprimaryuser: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), bstrprimaryuser.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Owner(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrowner: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), bstrowner.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Division(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDivision<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdivision: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), bstrdivision.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Department(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDepartment<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdepartment: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), bstrdepartment.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Role(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetRole<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrrole: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), bstrrole.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn OperatingSystem(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).36)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetOperatingSystem<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstroperatingsystem: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).37)(::core::mem::transmute_copy(self), bstroperatingsystem.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn OperatingSystemVersion(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).38)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetOperatingSystemVersion<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstroperatingsystemversion: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).39)(::core::mem::transmute_copy(self), bstroperatingsystemversion.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Model(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).40)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetModel<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrmodel: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).41)(::core::mem::transmute_copy(self), bstrmodel.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Processor(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).42)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetProcessor<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrprocessor: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).43)(::core::mem::transmute_copy(self), bstrprocessor.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ProcessorCount(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).44)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetProcessorCount<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrprocessorcount: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).45)(::core::mem::transmute_copy(self), bstrprocessorcount.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn MemorySize(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).46)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetMemorySize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrmemorysize: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).47)(::core::mem::transmute_copy(self), bstrmemorysize.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn StorageCapacity(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).48)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetStorageCapacity<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrstoragecapacity: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).49)(::core::mem::transmute_copy(self), bstrstoragecapacity.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn NetAddresses(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).50)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetNetAddresses<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vnetaddresses: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).51)(::core::mem::transmute_copy(self), vnetaddresses.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsComputer { type Vtable = IADsComputer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xefe3cc70_1d9f_11cf_b1f3_02608c9e7553); } impl ::core::convert::From<IADsComputer> for ::windows::core::IUnknown { fn from(value: IADsComputer) -> Self { value.0 } } impl ::core::convert::From<&IADsComputer> for ::windows::core::IUnknown { fn from(value: &IADsComputer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsComputer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsComputer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsComputer> for IADs { fn from(value: IADsComputer) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsComputer> for IADs { fn from(value: &IADsComputer) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsComputer { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsComputer { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsComputer> for super::super::System::Com::IDispatch { fn from(value: IADsComputer) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsComputer> for super::super::System::Com::IDispatch { fn from(value: &IADsComputer) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsComputer { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsComputer { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsComputer_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdescription: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrlocation: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrprimaryuser: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrowner: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdivision: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdepartment: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstroperatingsystem: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstroperatingsystemversion: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrmodel: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrprocessor: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrprocessorcount: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrmemorysize: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrstoragecapacity: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vnetaddresses: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsComputerOperations(pub ::windows::core::IUnknown); impl IADsComputerOperations { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Status(&self) -> ::windows::core::Result<super::super::System::Com::IDispatch> { let mut result__: <super::super::System::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::IDispatch>(result__) } pub unsafe fn Shutdown(&self, breboot: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), ::core::mem::transmute(breboot)).ok() } } unsafe impl ::windows::core::Interface for IADsComputerOperations { type Vtable = IADsComputerOperations_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xef497680_1d9f_11cf_b1f3_02608c9e7553); } impl ::core::convert::From<IADsComputerOperations> for ::windows::core::IUnknown { fn from(value: IADsComputerOperations) -> Self { value.0 } } impl ::core::convert::From<&IADsComputerOperations> for ::windows::core::IUnknown { fn from(value: &IADsComputerOperations) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsComputerOperations { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsComputerOperations { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsComputerOperations> for IADs { fn from(value: IADsComputerOperations) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsComputerOperations> for IADs { fn from(value: &IADsComputerOperations) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsComputerOperations { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsComputerOperations { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsComputerOperations> for super::super::System::Com::IDispatch { fn from(value: IADsComputerOperations) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsComputerOperations> for super::super::System::Com::IDispatch { fn from(value: &IADsComputerOperations) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsComputerOperations { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsComputerOperations { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsComputerOperations_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, breboot: i16) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsContainer(pub ::windows::core::IUnknown); impl IADsContainer { pub unsafe fn Count(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn _NewEnum(&self) -> ::windows::core::Result<::windows::core::IUnknown> { let mut result__: <::windows::core::IUnknown as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<::windows::core::IUnknown>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Filter(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetFilter<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, var: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), var.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Hints(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetHints<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vhints: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), vhints.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn GetObject<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, classname: Param0, relativename: Param1) -> ::windows::core::Result<super::super::System::Com::IDispatch> { let mut result__: <super::super::System::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), classname.into_param().abi(), relativename.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::IDispatch>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn Create<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, classname: Param0, relativename: Param1) -> ::windows::core::Result<super::super::System::Com::IDispatch> { let mut result__: <super::super::System::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), classname.into_param().abi(), relativename.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::IDispatch>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Delete<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrclassname: Param0, bstrrelativename: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrclassname.into_param().abi(), bstrrelativename.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn CopyHere<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, sourcename: Param0, newname: Param1) -> ::windows::core::Result<super::super::System::Com::IDispatch> { let mut result__: <super::super::System::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), sourcename.into_param().abi(), newname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::IDispatch>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn MoveHere<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, sourcename: Param0, newname: Param1) -> ::windows::core::Result<super::super::System::Com::IDispatch> { let mut result__: <super::super::System::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), sourcename.into_param().abi(), newname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IADsContainer { type Vtable = IADsContainer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x001677d0_fd16_11ce_abc4_02608c9e7553); } impl ::core::convert::From<IADsContainer> for ::windows::core::IUnknown { fn from(value: IADsContainer) -> Self { value.0 } } impl ::core::convert::From<&IADsContainer> for ::windows::core::IUnknown { fn from(value: &IADsContainer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsContainer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsContainer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsContainer> for super::super::System::Com::IDispatch { fn from(value: IADsContainer) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsContainer> for super::super::System::Com::IDispatch { fn from(value: &IADsContainer) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsContainer { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsContainer { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsContainer_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvar: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, var: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvfilter: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vhints: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, classname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, relativename: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, ppobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, classname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, relativename: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, ppobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrclassname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bstrrelativename: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, sourcename: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, newname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, ppobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, sourcename: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, newname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, ppobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsDNWithBinary(pub ::windows::core::IUnknown); impl IADsDNWithBinary { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn BinaryValue(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetBinaryValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vbinaryvalue: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), vbinaryvalue.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DNString(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDNString<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdnstring: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), bstrdnstring.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsDNWithBinary { type Vtable = IADsDNWithBinary_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7e99c0a2_f935_11d2_ba96_00c04fb6d0d1); } impl ::core::convert::From<IADsDNWithBinary> for ::windows::core::IUnknown { fn from(value: IADsDNWithBinary) -> Self { value.0 } } impl ::core::convert::From<&IADsDNWithBinary> for ::windows::core::IUnknown { fn from(value: &IADsDNWithBinary) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsDNWithBinary { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsDNWithBinary { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsDNWithBinary> for super::super::System::Com::IDispatch { fn from(value: IADsDNWithBinary) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsDNWithBinary> for super::super::System::Com::IDispatch { fn from(value: &IADsDNWithBinary) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsDNWithBinary { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsDNWithBinary { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsDNWithBinary_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vbinaryvalue: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdnstring: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsDNWithString(pub ::windows::core::IUnknown); impl IADsDNWithString { #[cfg(feature = "Win32_Foundation")] pub unsafe fn StringValue(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetStringValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrstringvalue: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), bstrstringvalue.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DNString(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDNString<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdnstring: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), bstrdnstring.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsDNWithString { type Vtable = IADsDNWithString_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x370df02e_f934_11d2_ba96_00c04fb6d0d1); } impl ::core::convert::From<IADsDNWithString> for ::windows::core::IUnknown { fn from(value: IADsDNWithString) -> Self { value.0 } } impl ::core::convert::From<&IADsDNWithString> for ::windows::core::IUnknown { fn from(value: &IADsDNWithString) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsDNWithString { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsDNWithString { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsDNWithString> for super::super::System::Com::IDispatch { fn from(value: IADsDNWithString) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsDNWithString> for super::super::System::Com::IDispatch { fn from(value: &IADsDNWithString) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsDNWithString { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsDNWithString { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsDNWithString_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrstringvalue: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdnstring: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsDeleteOps(pub ::windows::core::IUnknown); impl IADsDeleteOps { pub unsafe fn DeleteObject(&self, lnflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnflags)).ok() } } unsafe impl ::windows::core::Interface for IADsDeleteOps { type Vtable = IADsDeleteOps_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb2bd0902_8878_11d1_8c21_00c04fd8d503); } impl ::core::convert::From<IADsDeleteOps> for ::windows::core::IUnknown { fn from(value: IADsDeleteOps) -> Self { value.0 } } impl ::core::convert::From<&IADsDeleteOps> for ::windows::core::IUnknown { fn from(value: &IADsDeleteOps) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsDeleteOps { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsDeleteOps { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsDeleteOps> for super::super::System::Com::IDispatch { fn from(value: IADsDeleteOps) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsDeleteOps> for super::super::System::Com::IDispatch { fn from(value: &IADsDeleteOps) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsDeleteOps { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsDeleteOps { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsDeleteOps_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnflags: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsDomain(pub ::windows::core::IUnknown); impl IADsDomain { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } pub unsafe fn IsWorkgroup(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn MinPasswordLength(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMinPasswordLength(&self, lnminpasswordlength: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnminpasswordlength)).ok() } pub unsafe fn MinPasswordAge(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMinPasswordAge(&self, lnminpasswordage: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnminpasswordage)).ok() } pub unsafe fn MaxPasswordAge(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMaxPasswordAge(&self, lnmaxpasswordage: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnmaxpasswordage)).ok() } pub unsafe fn MaxBadPasswordsAllowed(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMaxBadPasswordsAllowed(&self, lnmaxbadpasswordsallowed: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnmaxbadpasswordsallowed)).ok() } pub unsafe fn PasswordHistoryLength(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetPasswordHistoryLength(&self, lnpasswordhistorylength: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnpasswordhistorylength)).ok() } pub unsafe fn PasswordAttributes(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetPasswordAttributes(&self, lnpasswordattributes: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnpasswordattributes)).ok() } pub unsafe fn AutoUnlockInterval(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAutoUnlockInterval(&self, lnautounlockinterval: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnautounlockinterval)).ok() } pub unsafe fn LockoutObservationInterval(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetLockoutObservationInterval(&self, lnlockoutobservationinterval: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).36)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnlockoutobservationinterval)).ok() } } unsafe impl ::windows::core::Interface for IADsDomain { type Vtable = IADsDomain_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x00e4c220_fd16_11ce_abc4_02608c9e7553); } impl ::core::convert::From<IADsDomain> for ::windows::core::IUnknown { fn from(value: IADsDomain) -> Self { value.0 } } impl ::core::convert::From<&IADsDomain> for ::windows::core::IUnknown { fn from(value: &IADsDomain) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsDomain { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsDomain { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsDomain> for IADs { fn from(value: IADsDomain) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsDomain> for IADs { fn from(value: &IADsDomain) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsDomain { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsDomain { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsDomain> for super::super::System::Com::IDispatch { fn from(value: IADsDomain) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsDomain> for super::super::System::Com::IDispatch { fn from(value: &IADsDomain) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsDomain { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsDomain { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsDomain_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnminpasswordlength: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnminpasswordage: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnmaxpasswordage: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnmaxbadpasswordsallowed: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnpasswordhistorylength: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnpasswordattributes: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnautounlockinterval: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnlockoutobservationinterval: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsEmail(pub ::windows::core::IUnknown); impl IADsEmail { pub unsafe fn Type(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetType(&self, lntype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(lntype)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Address(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetAddress<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstraddress: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), bstraddress.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsEmail { type Vtable = IADsEmail_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x97af011a_478e_11d1_a3b4_00c04fb950dc); } impl ::core::convert::From<IADsEmail> for ::windows::core::IUnknown { fn from(value: IADsEmail) -> Self { value.0 } } impl ::core::convert::From<&IADsEmail> for ::windows::core::IUnknown { fn from(value: &IADsEmail) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsEmail { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsEmail { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsEmail> for super::super::System::Com::IDispatch { fn from(value: IADsEmail) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsEmail> for super::super::System::Com::IDispatch { fn from(value: &IADsEmail) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsEmail { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsEmail { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsEmail_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lntype: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstraddress: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsExtension(pub ::windows::core::IUnknown); impl IADsExtension { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Operate<'a, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>, Param3: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, dwcode: u32, vardata1: Param1, vardata2: Param2, vardata3: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwcode), vardata1.into_param().abi(), vardata2.into_param().abi(), vardata3.into_param().abi()).ok() } pub unsafe fn PrivateGetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const *const u16, cnames: u32, lcid: u32) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), &mut result__).from_abi::<i32>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PrivateInvoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } } unsafe impl ::windows::core::Interface for IADsExtension { type Vtable = IADsExtension_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3d35553c_d2b0_11d1_b17b_0000f87593a0); } impl ::core::convert::From<IADsExtension> for ::windows::core::IUnknown { fn from(value: IADsExtension) -> Self { value.0 } } impl ::core::convert::From<&IADsExtension> for ::windows::core::IUnknown { fn from(value: &IADsExtension) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsExtension { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsExtension { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IADsExtension_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwcode: u32, vardata1: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, vardata2: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, vardata3: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const *const u16, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsFaxNumber(pub ::windows::core::IUnknown); impl IADsFaxNumber { #[cfg(feature = "Win32_Foundation")] pub unsafe fn TelephoneNumber(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetTelephoneNumber<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrtelephonenumber: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), bstrtelephonenumber.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Parameters(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetParameters<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vparameters: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), vparameters.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsFaxNumber { type Vtable = IADsFaxNumber_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa910dea9_4680_11d1_a3b4_00c04fb950dc); } impl ::core::convert::From<IADsFaxNumber> for ::windows::core::IUnknown { fn from(value: IADsFaxNumber) -> Self { value.0 } } impl ::core::convert::From<&IADsFaxNumber> for ::windows::core::IUnknown { fn from(value: &IADsFaxNumber) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsFaxNumber { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsFaxNumber { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsFaxNumber> for super::super::System::Com::IDispatch { fn from(value: IADsFaxNumber) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsFaxNumber> for super::super::System::Com::IDispatch { fn from(value: &IADsFaxNumber) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsFaxNumber { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsFaxNumber { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsFaxNumber_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrtelephonenumber: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vparameters: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsFileService(pub ::windows::core::IUnknown); impl IADsFileService { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn HostComputer(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetHostComputer<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrhostcomputer: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), bstrhostcomputer.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DisplayName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDisplayName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdisplayname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), bstrdisplayname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Version(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetVersion<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrversion: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), bstrversion.into_param().abi()).ok() } pub unsafe fn ServiceType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetServiceType(&self, lnservicetype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnservicetype)).ok() } pub unsafe fn StartType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetStartType(&self, lnstarttype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnstarttype)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Path(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPath<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrpath: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), bstrpath.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn StartupParameters(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetStartupParameters<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrstartupparameters: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), bstrstartupparameters.into_param().abi()).ok() } pub unsafe fn ErrorControl(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetErrorControl(&self, lnerrorcontrol: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnerrorcontrol)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn LoadOrderGroup(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).36)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLoadOrderGroup<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrloadordergroup: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).37)(::core::mem::transmute_copy(self), bstrloadordergroup.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ServiceAccountName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).38)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetServiceAccountName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrserviceaccountname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).39)(::core::mem::transmute_copy(self), bstrserviceaccountname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ServiceAccountPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).40)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetServiceAccountPath<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrserviceaccountpath: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).41)(::core::mem::transmute_copy(self), bstrserviceaccountpath.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Dependencies(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).42)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetDependencies<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vdependencies: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).43)(::core::mem::transmute_copy(self), vdependencies.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Description(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).44)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDescription<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdescription: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).45)(::core::mem::transmute_copy(self), bstrdescription.into_param().abi()).ok() } pub unsafe fn MaxUserCount(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).46)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMaxUserCount(&self, lnmaxusercount: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).47)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnmaxusercount)).ok() } } unsafe impl ::windows::core::Interface for IADsFileService { type Vtable = IADsFileService_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa89d1900_31ca_11cf_a98a_00aa006bc149); } impl ::core::convert::From<IADsFileService> for ::windows::core::IUnknown { fn from(value: IADsFileService) -> Self { value.0 } } impl ::core::convert::From<&IADsFileService> for ::windows::core::IUnknown { fn from(value: &IADsFileService) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsFileService { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsFileService { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsFileService> for IADsService { fn from(value: IADsFileService) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsFileService> for IADsService { fn from(value: &IADsFileService) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADsService> for IADsFileService { fn into_param(self) -> ::windows::core::Param<'a, IADsService> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADsService> for &IADsFileService { fn into_param(self) -> ::windows::core::Param<'a, IADsService> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } impl ::core::convert::From<IADsFileService> for IADs { fn from(value: IADsFileService) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsFileService> for IADs { fn from(value: &IADsFileService) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsFileService { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsFileService { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsFileService> for super::super::System::Com::IDispatch { fn from(value: IADsFileService) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsFileService> for super::super::System::Com::IDispatch { fn from(value: &IADsFileService) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsFileService { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsFileService { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsFileService_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrhostcomputer: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdisplayname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrversion: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnservicetype: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnstarttype: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrstartupparameters: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnerrorcontrol: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrloadordergroup: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrserviceaccountname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrserviceaccountpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vdependencies: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdescription: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnmaxusercount: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsFileServiceOperations(pub ::windows::core::IUnknown); impl IADsFileServiceOperations { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } pub unsafe fn Status(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn Start(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Stop(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Pause(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Continue(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPassword<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrnewpassword: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), bstrnewpassword.into_param().abi()).ok() } pub unsafe fn Sessions(&self) -> ::windows::core::Result<IADsCollection> { let mut result__: <IADsCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IADsCollection>(result__) } pub unsafe fn Resources(&self) -> ::windows::core::Result<IADsCollection> { let mut result__: <IADsCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IADsCollection>(result__) } } unsafe impl ::windows::core::Interface for IADsFileServiceOperations { type Vtable = IADsFileServiceOperations_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa02ded10_31ca_11cf_a98a_00aa006bc149); } impl ::core::convert::From<IADsFileServiceOperations> for ::windows::core::IUnknown { fn from(value: IADsFileServiceOperations) -> Self { value.0 } } impl ::core::convert::From<&IADsFileServiceOperations> for ::windows::core::IUnknown { fn from(value: &IADsFileServiceOperations) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsFileServiceOperations { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsFileServiceOperations { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsFileServiceOperations> for IADsServiceOperations { fn from(value: IADsFileServiceOperations) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsFileServiceOperations> for IADsServiceOperations { fn from(value: &IADsFileServiceOperations) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADsServiceOperations> for IADsFileServiceOperations { fn into_param(self) -> ::windows::core::Param<'a, IADsServiceOperations> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADsServiceOperations> for &IADsFileServiceOperations { fn into_param(self) -> ::windows::core::Param<'a, IADsServiceOperations> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } impl ::core::convert::From<IADsFileServiceOperations> for IADs { fn from(value: IADsFileServiceOperations) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsFileServiceOperations> for IADs { fn from(value: &IADsFileServiceOperations) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsFileServiceOperations { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsFileServiceOperations { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsFileServiceOperations> for super::super::System::Com::IDispatch { fn from(value: IADsFileServiceOperations) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsFileServiceOperations> for super::super::System::Com::IDispatch { fn from(value: &IADsFileServiceOperations) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsFileServiceOperations { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsFileServiceOperations { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsFileServiceOperations_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrnewpassword: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppsessions: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppresources: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsFileShare(pub ::windows::core::IUnknown); impl IADsFileShare { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } pub unsafe fn CurrentUserCount(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Description(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDescription<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdescription: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), bstrdescription.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn HostComputer(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetHostComputer<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrhostcomputer: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), bstrhostcomputer.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Path(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPath<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrpath: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), bstrpath.into_param().abi()).ok() } pub unsafe fn MaxUserCount(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMaxUserCount(&self, lnmaxusercount: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnmaxusercount)).ok() } } unsafe impl ::windows::core::Interface for IADsFileShare { type Vtable = IADsFileShare_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeb6dcaf0_4b83_11cf_a995_00aa006bc149); } impl ::core::convert::From<IADsFileShare> for ::windows::core::IUnknown { fn from(value: IADsFileShare) -> Self { value.0 } } impl ::core::convert::From<&IADsFileShare> for ::windows::core::IUnknown { fn from(value: &IADsFileShare) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsFileShare { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsFileShare { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsFileShare> for IADs { fn from(value: IADsFileShare) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsFileShare> for IADs { fn from(value: &IADsFileShare) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsFileShare { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsFileShare { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsFileShare> for super::super::System::Com::IDispatch { fn from(value: IADsFileShare) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsFileShare> for super::super::System::Com::IDispatch { fn from(value: &IADsFileShare) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsFileShare { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsFileShare { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsFileShare_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdescription: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrhostcomputer: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnmaxusercount: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsGroup(pub ::windows::core::IUnknown); impl IADsGroup { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Description(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDescription<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdescription: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), bstrdescription.into_param().abi()).ok() } pub unsafe fn Members(&self) -> ::windows::core::Result<IADsMembers> { let mut result__: <IADsMembers as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IADsMembers>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn IsMember<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrmember: Param0) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), bstrmember.into_param().abi(), &mut result__).from_abi::<i16>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Add<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrnewitem: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), bstrnewitem.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Remove<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstritemtoberemoved: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), bstritemtoberemoved.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsGroup { type Vtable = IADsGroup_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x27636b00_410f_11cf_b1ff_02608c9e7553); } impl ::core::convert::From<IADsGroup> for ::windows::core::IUnknown { fn from(value: IADsGroup) -> Self { value.0 } } impl ::core::convert::From<&IADsGroup> for ::windows::core::IUnknown { fn from(value: &IADsGroup) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsGroup { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsGroup { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsGroup> for IADs { fn from(value: IADsGroup) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsGroup> for IADs { fn from(value: &IADsGroup) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsGroup { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsGroup { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsGroup> for super::super::System::Com::IDispatch { fn from(value: IADsGroup) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsGroup> for super::super::System::Com::IDispatch { fn from(value: &IADsGroup) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsGroup { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsGroup { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsGroup_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdescription: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppmembers: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrmember: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bmember: *mut i16) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrnewitem: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstritemtoberemoved: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsHold(pub ::windows::core::IUnknown); impl IADsHold { #[cfg(feature = "Win32_Foundation")] pub unsafe fn ObjectName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetObjectName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrobjectname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), bstrobjectname.into_param().abi()).ok() } pub unsafe fn Amount(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAmount(&self, lnamount: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnamount)).ok() } } unsafe impl ::windows::core::Interface for IADsHold { type Vtable = IADsHold_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb3eb3b37_4080_11d1_a3ac_00c04fb950dc); } impl ::core::convert::From<IADsHold> for ::windows::core::IUnknown { fn from(value: IADsHold) -> Self { value.0 } } impl ::core::convert::From<&IADsHold> for ::windows::core::IUnknown { fn from(value: &IADsHold) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsHold { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsHold { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsHold> for super::super::System::Com::IDispatch { fn from(value: IADsHold) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsHold> for super::super::System::Com::IDispatch { fn from(value: &IADsHold) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsHold { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsHold { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsHold_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrobjectname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnamount: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsLargeInteger(pub ::windows::core::IUnknown); impl IADsLargeInteger { pub unsafe fn HighPart(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetHighPart(&self, lnhighpart: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnhighpart)).ok() } pub unsafe fn LowPart(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetLowPart(&self, lnlowpart: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnlowpart)).ok() } } unsafe impl ::windows::core::Interface for IADsLargeInteger { type Vtable = IADsLargeInteger_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9068270b_0939_11d1_8be1_00c04fd8d503); } impl ::core::convert::From<IADsLargeInteger> for ::windows::core::IUnknown { fn from(value: IADsLargeInteger) -> Self { value.0 } } impl ::core::convert::From<&IADsLargeInteger> for ::windows::core::IUnknown { fn from(value: &IADsLargeInteger) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsLargeInteger { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsLargeInteger { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsLargeInteger> for super::super::System::Com::IDispatch { fn from(value: IADsLargeInteger) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsLargeInteger> for super::super::System::Com::IDispatch { fn from(value: &IADsLargeInteger) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsLargeInteger { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsLargeInteger { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsLargeInteger_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnhighpart: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnlowpart: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsLocality(pub ::windows::core::IUnknown); impl IADsLocality { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Description(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDescription<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdescription: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), bstrdescription.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn LocalityName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLocalityName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrlocalityname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), bstrlocalityname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PostalAddress(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPostalAddress<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrpostaladdress: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), bstrpostaladdress.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SeeAlso(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetSeeAlso<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vseealso: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), vseealso.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsLocality { type Vtable = IADsLocality_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa05e03a2_effe_11cf_8abc_00c04fd8d503); } impl ::core::convert::From<IADsLocality> for ::windows::core::IUnknown { fn from(value: IADsLocality) -> Self { value.0 } } impl ::core::convert::From<&IADsLocality> for ::windows::core::IUnknown { fn from(value: &IADsLocality) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsLocality { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsLocality { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsLocality> for IADs { fn from(value: IADsLocality) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsLocality> for IADs { fn from(value: &IADsLocality) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsLocality { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsLocality { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsLocality> for super::super::System::Com::IDispatch { fn from(value: IADsLocality) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsLocality> for super::super::System::Com::IDispatch { fn from(value: &IADsLocality) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsLocality { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsLocality { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsLocality_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdescription: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrlocalityname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrpostaladdress: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vseealso: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsMembers(pub ::windows::core::IUnknown); impl IADsMembers { pub unsafe fn Count(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn _NewEnum(&self) -> ::windows::core::Result<::windows::core::IUnknown> { let mut result__: <::windows::core::IUnknown as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<::windows::core::IUnknown>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Filter(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetFilter<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, pvfilter: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), pvfilter.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsMembers { type Vtable = IADsMembers_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x451a0030_72ec_11cf_b03b_00aa006e0975); } impl ::core::convert::From<IADsMembers> for ::windows::core::IUnknown { fn from(value: IADsMembers) -> Self { value.0 } } impl ::core::convert::From<&IADsMembers> for ::windows::core::IUnknown { fn from(value: &IADsMembers) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsMembers { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsMembers { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsMembers> for super::super::System::Com::IDispatch { fn from(value: IADsMembers) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsMembers> for super::super::System::Com::IDispatch { fn from(value: &IADsMembers) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsMembers { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsMembers { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsMembers_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plcount: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppenumerator: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvfilter: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvfilter: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsNameTranslate(pub ::windows::core::IUnknown); impl IADsNameTranslate { pub unsafe fn SetChaseReferral(&self, lnchasereferral: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnchasereferral)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Init<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, lnsettype: i32, bstradspath: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnsettype), bstradspath.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn InitEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, lnsettype: i32, bstradspath: Param1, bstruserid: Param2, bstrdomain: Param3, bstrpassword: Param4) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnsettype), bstradspath.into_param().abi(), bstruserid.into_param().abi(), bstrdomain.into_param().abi(), bstrpassword.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Set<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, lnsettype: i32, bstradspath: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnsettype), bstradspath.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Get(&self, lnformattype: i32) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnformattype), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lnformattype: i32, pvar: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnformattype), pvar.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx(&self, lnformattype: i32) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnformattype), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } } unsafe impl ::windows::core::Interface for IADsNameTranslate { type Vtable = IADsNameTranslate_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb1b272a3_3625_11d1_a3a4_00c04fb950dc); } impl ::core::convert::From<IADsNameTranslate> for ::windows::core::IUnknown { fn from(value: IADsNameTranslate) -> Self { value.0 } } impl ::core::convert::From<&IADsNameTranslate> for ::windows::core::IUnknown { fn from(value: &IADsNameTranslate) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsNameTranslate { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsNameTranslate { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsNameTranslate> for super::super::System::Com::IDispatch { fn from(value: IADsNameTranslate) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsNameTranslate> for super::super::System::Com::IDispatch { fn from(value: &IADsNameTranslate) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsNameTranslate { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsNameTranslate { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsNameTranslate_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnchasereferral: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnsettype: i32, bstradspath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnsettype: i32, bstradspath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bstruserid: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bstrdomain: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bstrpassword: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnsettype: i32, bstradspath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnformattype: i32, pbstradspath: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnformattype: i32, pvar: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnformattype: i32, pvar: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsNamespaces(pub ::windows::core::IUnknown); impl IADsNamespaces { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DefaultContainer(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDefaultContainer<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdefaultcontainer: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), bstrdefaultcontainer.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsNamespaces { type Vtable = IADsNamespaces_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x28b96ba0_b330_11cf_a9ad_00aa006bc149); } impl ::core::convert::From<IADsNamespaces> for ::windows::core::IUnknown { fn from(value: IADsNamespaces) -> Self { value.0 } } impl ::core::convert::From<&IADsNamespaces> for ::windows::core::IUnknown { fn from(value: &IADsNamespaces) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsNamespaces { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsNamespaces { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsNamespaces> for IADs { fn from(value: IADsNamespaces) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsNamespaces> for IADs { fn from(value: &IADsNamespaces) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsNamespaces { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsNamespaces { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsNamespaces> for super::super::System::Com::IDispatch { fn from(value: IADsNamespaces) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsNamespaces> for super::super::System::Com::IDispatch { fn from(value: &IADsNamespaces) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsNamespaces { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsNamespaces { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsNamespaces_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdefaultcontainer: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsNetAddress(pub ::windows::core::IUnknown); impl IADsNetAddress { pub unsafe fn AddressType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAddressType(&self, lnaddresstype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnaddresstype)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Address(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetAddress<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vaddress: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), vaddress.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsNetAddress { type Vtable = IADsNetAddress_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb21a50a9_4080_11d1_a3ac_00c04fb950dc); } impl ::core::convert::From<IADsNetAddress> for ::windows::core::IUnknown { fn from(value: IADsNetAddress) -> Self { value.0 } } impl ::core::convert::From<&IADsNetAddress> for ::windows::core::IUnknown { fn from(value: &IADsNetAddress) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsNetAddress { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsNetAddress { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsNetAddress> for super::super::System::Com::IDispatch { fn from(value: IADsNetAddress) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsNetAddress> for super::super::System::Com::IDispatch { fn from(value: &IADsNetAddress) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsNetAddress { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsNetAddress { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsNetAddress_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnaddresstype: i32) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vaddress: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsO(pub ::windows::core::IUnknown); impl IADsO { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Description(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDescription<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdescription: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), bstrdescription.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn LocalityName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLocalityName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrlocalityname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), bstrlocalityname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PostalAddress(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPostalAddress<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrpostaladdress: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), bstrpostaladdress.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn TelephoneNumber(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetTelephoneNumber<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrtelephonenumber: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), bstrtelephonenumber.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn FaxNumber(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetFaxNumber<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrfaxnumber: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), bstrfaxnumber.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SeeAlso(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetSeeAlso<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vseealso: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), vseealso.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsO { type Vtable = IADsO_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa1cd2dc6_effe_11cf_8abc_00c04fd8d503); } impl ::core::convert::From<IADsO> for ::windows::core::IUnknown { fn from(value: IADsO) -> Self { value.0 } } impl ::core::convert::From<&IADsO> for ::windows::core::IUnknown { fn from(value: &IADsO) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsO { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsO { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsO> for IADs { fn from(value: IADsO) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsO> for IADs { fn from(value: &IADsO) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsO { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsO { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsO> for super::super::System::Com::IDispatch { fn from(value: IADsO) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsO> for super::super::System::Com::IDispatch { fn from(value: &IADsO) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsO { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsO { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsO_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdescription: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrlocalityname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrpostaladdress: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrtelephonenumber: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrfaxnumber: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vseealso: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsOU(pub ::windows::core::IUnknown); impl IADsOU { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Description(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDescription<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdescription: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), bstrdescription.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn LocalityName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLocalityName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrlocalityname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), bstrlocalityname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PostalAddress(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPostalAddress<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrpostaladdress: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), bstrpostaladdress.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn TelephoneNumber(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetTelephoneNumber<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrtelephonenumber: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), bstrtelephonenumber.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn FaxNumber(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetFaxNumber<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrfaxnumber: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), bstrfaxnumber.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SeeAlso(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetSeeAlso<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vseealso: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), vseealso.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn BusinessCategory(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetBusinessCategory<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrbusinesscategory: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), bstrbusinesscategory.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsOU { type Vtable = IADsOU_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa2f733b8_effe_11cf_8abc_00c04fd8d503); } impl ::core::convert::From<IADsOU> for ::windows::core::IUnknown { fn from(value: IADsOU) -> Self { value.0 } } impl ::core::convert::From<&IADsOU> for ::windows::core::IUnknown { fn from(value: &IADsOU) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsOU { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsOU { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsOU> for IADs { fn from(value: IADsOU) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsOU> for IADs { fn from(value: &IADsOU) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsOU { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsOU { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsOU> for super::super::System::Com::IDispatch { fn from(value: IADsOU) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsOU> for super::super::System::Com::IDispatch { fn from(value: &IADsOU) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsOU { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsOU { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsOU_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdescription: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrlocalityname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrpostaladdress: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrtelephonenumber: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrfaxnumber: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vseealso: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrbusinesscategory: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsObjectOptions(pub ::windows::core::IUnknown); impl IADsObjectOptions { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetOption(&self, lnoption: i32) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnoption), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetOption<'a, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lnoption: i32, vvalue: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnoption), vvalue.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsObjectOptions { type Vtable = IADsObjectOptions_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x46f14fda_232b_11d1_a808_00c04fd8d5a8); } impl ::core::convert::From<IADsObjectOptions> for ::windows::core::IUnknown { fn from(value: IADsObjectOptions) -> Self { value.0 } } impl ::core::convert::From<&IADsObjectOptions> for ::windows::core::IUnknown { fn from(value: &IADsObjectOptions) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsObjectOptions { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsObjectOptions { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsObjectOptions> for super::super::System::Com::IDispatch { fn from(value: IADsObjectOptions) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsObjectOptions> for super::super::System::Com::IDispatch { fn from(value: &IADsObjectOptions) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsObjectOptions { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsObjectOptions { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsObjectOptions_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnoption: i32, pvvalue: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnoption: i32, vvalue: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsOctetList(pub ::windows::core::IUnknown); impl IADsOctetList { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn OctetList(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetOctetList<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, voctetlist: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), voctetlist.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsOctetList { type Vtable = IADsOctetList_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7b28b80f_4680_11d1_a3b4_00c04fb950dc); } impl ::core::convert::From<IADsOctetList> for ::windows::core::IUnknown { fn from(value: IADsOctetList) -> Self { value.0 } } impl ::core::convert::From<&IADsOctetList> for ::windows::core::IUnknown { fn from(value: &IADsOctetList) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsOctetList { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsOctetList { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsOctetList> for super::super::System::Com::IDispatch { fn from(value: IADsOctetList) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsOctetList> for super::super::System::Com::IDispatch { fn from(value: &IADsOctetList) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsOctetList { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsOctetList { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsOctetList_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, voctetlist: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsOpenDSObject(pub ::windows::core::IUnknown); impl IADsOpenDSObject { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn OpenDSObject<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, lpszdnname: Param0, lpszusername: Param1, lpszpassword: Param2, lnreserved: i32) -> ::windows::core::Result<super::super::System::Com::IDispatch> { let mut result__: <super::super::System::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), lpszdnname.into_param().abi(), lpszusername.into_param().abi(), lpszpassword.into_param().abi(), ::core::mem::transmute(lnreserved), &mut result__).from_abi::<super::super::System::Com::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IADsOpenDSObject { type Vtable = IADsOpenDSObject_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xddf2891e_0f9c_11d0_8ad4_00c04fd8d503); } impl ::core::convert::From<IADsOpenDSObject> for ::windows::core::IUnknown { fn from(value: IADsOpenDSObject) -> Self { value.0 } } impl ::core::convert::From<&IADsOpenDSObject> for ::windows::core::IUnknown { fn from(value: &IADsOpenDSObject) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsOpenDSObject { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsOpenDSObject { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsOpenDSObject> for super::super::System::Com::IDispatch { fn from(value: IADsOpenDSObject) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsOpenDSObject> for super::super::System::Com::IDispatch { fn from(value: &IADsOpenDSObject) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsOpenDSObject { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsOpenDSObject { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsOpenDSObject_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lpszdnname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lpszusername: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lpszpassword: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lnreserved: i32, ppoledsobj: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsPath(pub ::windows::core::IUnknown); impl IADsPath { pub unsafe fn Type(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetType(&self, lntype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(lntype)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn VolumeName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetVolumeName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrvolumename: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), bstrvolumename.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Path(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPath<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrpath: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), bstrpath.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsPath { type Vtable = IADsPath_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb287fcd5_4080_11d1_a3ac_00c04fb950dc); } impl ::core::convert::From<IADsPath> for ::windows::core::IUnknown { fn from(value: IADsPath) -> Self { value.0 } } impl ::core::convert::From<&IADsPath> for ::windows::core::IUnknown { fn from(value: &IADsPath) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsPath { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsPath { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsPath> for super::super::System::Com::IDispatch { fn from(value: IADsPath) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsPath> for super::super::System::Com::IDispatch { fn from(value: &IADsPath) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsPath { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsPath { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsPath_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lntype: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrvolumename: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsPathname(pub ::windows::core::IUnknown); impl IADsPathname { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Set<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstradspath: Param0, lnsettype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), bstradspath.into_param().abi(), ::core::mem::transmute(lnsettype)).ok() } pub unsafe fn SetDisplayType(&self, lndisplaytype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(lndisplaytype)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Retrieve(&self, lnformattype: i32) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnformattype), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetNumElements(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetElement(&self, lnelementindex: i32) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnelementindex), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn AddLeafElement<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrleafelement: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), bstrleafelement.into_param().abi()).ok() } pub unsafe fn RemoveLeafElement(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CopyPath(&self) -> ::windows::core::Result<super::super::System::Com::IDispatch> { let mut result__: <super::super::System::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::IDispatch>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetEscapedElement<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, lnreserved: i32, bstrinstr: Param1) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnreserved), bstrinstr.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn EscapedMode(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetEscapedMode(&self, lnescapedmode: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnescapedmode)).ok() } } unsafe impl ::windows::core::Interface for IADsPathname { type Vtable = IADsPathname_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd592aed4_f420_11d0_a36e_00c04fb950dc); } impl ::core::convert::From<IADsPathname> for ::windows::core::IUnknown { fn from(value: IADsPathname) -> Self { value.0 } } impl ::core::convert::From<&IADsPathname> for ::windows::core::IUnknown { fn from(value: &IADsPathname) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsPathname { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsPathname { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsPathname> for super::super::System::Com::IDispatch { fn from(value: IADsPathname) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsPathname> for super::super::System::Com::IDispatch { fn from(value: &IADsPathname) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsPathname { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsPathname { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsPathname_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstradspath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lnsettype: i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lndisplaytype: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnformattype: i32, pbstradspath: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plnnumpathelements: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnelementindex: i32, pbstrelement: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrleafelement: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppadspath: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnreserved: i32, bstrinstr: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pbstroutstr: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnescapedmode: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsPostalAddress(pub ::windows::core::IUnknown); impl IADsPostalAddress { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PostalAddress(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetPostalAddress<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vpostaladdress: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), vpostaladdress.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsPostalAddress { type Vtable = IADsPostalAddress_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7adecf29_4680_11d1_a3b4_00c04fb950dc); } impl ::core::convert::From<IADsPostalAddress> for ::windows::core::IUnknown { fn from(value: IADsPostalAddress) -> Self { value.0 } } impl ::core::convert::From<&IADsPostalAddress> for ::windows::core::IUnknown { fn from(value: &IADsPostalAddress) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsPostalAddress { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsPostalAddress { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsPostalAddress> for super::super::System::Com::IDispatch { fn from(value: IADsPostalAddress) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsPostalAddress> for super::super::System::Com::IDispatch { fn from(value: &IADsPostalAddress) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsPostalAddress { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsPostalAddress { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsPostalAddress_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vpostaladdress: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsPrintJob(pub ::windows::core::IUnknown); impl IADsPrintJob { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn HostPrintQueue(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn User(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn UserPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn TimeSubmitted(&self) -> ::windows::core::Result<f64> { let mut result__: <f64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<f64>(result__) } pub unsafe fn TotalPages(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn Size(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Description(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDescription<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdescription: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), bstrdescription.into_param().abi()).ok() } pub unsafe fn Priority(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetPriority(&self, lnpriority: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnpriority)).ok() } pub unsafe fn StartTime(&self) -> ::windows::core::Result<f64> { let mut result__: <f64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), &mut result__).from_abi::<f64>(result__) } pub unsafe fn SetStartTime(&self, dastarttime: f64) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), ::core::mem::transmute(dastarttime)).ok() } pub unsafe fn UntilTime(&self) -> ::windows::core::Result<f64> { let mut result__: <f64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), &mut result__).from_abi::<f64>(result__) } pub unsafe fn SetUntilTime(&self, dauntiltime: f64) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), ::core::mem::transmute(dauntiltime)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Notify(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetNotify<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrnotify: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), bstrnotify.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn NotifyPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).36)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetNotifyPath<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrnotifypath: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).37)(::core::mem::transmute_copy(self), bstrnotifypath.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsPrintJob { type Vtable = IADsPrintJob_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x32fb6780_1ed0_11cf_a988_00aa006bc149); } impl ::core::convert::From<IADsPrintJob> for ::windows::core::IUnknown { fn from(value: IADsPrintJob) -> Self { value.0 } } impl ::core::convert::From<&IADsPrintJob> for ::windows::core::IUnknown { fn from(value: &IADsPrintJob) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsPrintJob { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsPrintJob { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsPrintJob> for IADs { fn from(value: IADsPrintJob) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsPrintJob> for IADs { fn from(value: &IADsPrintJob) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsPrintJob { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsPrintJob { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsPrintJob> for super::super::System::Com::IDispatch { fn from(value: IADsPrintJob) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsPrintJob> for super::super::System::Com::IDispatch { fn from(value: &IADsPrintJob) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsPrintJob { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsPrintJob { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsPrintJob_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdescription: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnpriority: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dastarttime: f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dauntiltime: f64) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrnotify: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrnotifypath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsPrintJobOperations(pub ::windows::core::IUnknown); impl IADsPrintJobOperations { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } pub unsafe fn Status(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn TimeElapsed(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn PagesPrinted(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn Position(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetPosition(&self, lnposition: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnposition)).ok() } pub unsafe fn Pause(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Resume(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IADsPrintJobOperations { type Vtable = IADsPrintJobOperations_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9a52db30_1ecf_11cf_a988_00aa006bc149); } impl ::core::convert::From<IADsPrintJobOperations> for ::windows::core::IUnknown { fn from(value: IADsPrintJobOperations) -> Self { value.0 } } impl ::core::convert::From<&IADsPrintJobOperations> for ::windows::core::IUnknown { fn from(value: &IADsPrintJobOperations) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsPrintJobOperations { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsPrintJobOperations { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsPrintJobOperations> for IADs { fn from(value: IADsPrintJobOperations) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsPrintJobOperations> for IADs { fn from(value: &IADsPrintJobOperations) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsPrintJobOperations { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsPrintJobOperations { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsPrintJobOperations> for super::super::System::Com::IDispatch { fn from(value: IADsPrintJobOperations) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsPrintJobOperations> for super::super::System::Com::IDispatch { fn from(value: &IADsPrintJobOperations) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsPrintJobOperations { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsPrintJobOperations { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsPrintJobOperations_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnposition: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsPrintQueue(pub ::windows::core::IUnknown); impl IADsPrintQueue { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PrinterPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPrinterPath<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrprinterpath: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), bstrprinterpath.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Model(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetModel<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrmodel: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), bstrmodel.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Datatype(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDatatype<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdatatype: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), bstrdatatype.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PrintProcessor(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPrintProcessor<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrprintprocessor: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), bstrprintprocessor.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Description(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDescription<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdescription: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), bstrdescription.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Location(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLocation<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrlocation: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), bstrlocation.into_param().abi()).ok() } pub unsafe fn StartTime(&self) -> ::windows::core::Result<f64> { let mut result__: <f64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), &mut result__).from_abi::<f64>(result__) } pub unsafe fn SetStartTime(&self, dastarttime: f64) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), ::core::mem::transmute(dastarttime)).ok() } pub unsafe fn UntilTime(&self) -> ::windows::core::Result<f64> { let mut result__: <f64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), &mut result__).from_abi::<f64>(result__) } pub unsafe fn SetUntilTime(&self, dauntiltime: f64) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), ::core::mem::transmute(dauntiltime)).ok() } pub unsafe fn DefaultJobPriority(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).36)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetDefaultJobPriority(&self, lndefaultjobpriority: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).37)(::core::mem::transmute_copy(self), ::core::mem::transmute(lndefaultjobpriority)).ok() } pub unsafe fn Priority(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).38)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetPriority(&self, lnpriority: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).39)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnpriority)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn BannerPage(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).40)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetBannerPage<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrbannerpage: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).41)(::core::mem::transmute_copy(self), bstrbannerpage.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PrintDevices(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).42)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetPrintDevices<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vprintdevices: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).43)(::core::mem::transmute_copy(self), vprintdevices.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn NetAddresses(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).44)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetNetAddresses<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vnetaddresses: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).45)(::core::mem::transmute_copy(self), vnetaddresses.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsPrintQueue { type Vtable = IADsPrintQueue_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb15160d0_1226_11cf_a985_00aa006bc149); } impl ::core::convert::From<IADsPrintQueue> for ::windows::core::IUnknown { fn from(value: IADsPrintQueue) -> Self { value.0 } } impl ::core::convert::From<&IADsPrintQueue> for ::windows::core::IUnknown { fn from(value: &IADsPrintQueue) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsPrintQueue { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsPrintQueue { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsPrintQueue> for IADs { fn from(value: IADsPrintQueue) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsPrintQueue> for IADs { fn from(value: &IADsPrintQueue) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsPrintQueue { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsPrintQueue { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsPrintQueue> for super::super::System::Com::IDispatch { fn from(value: IADsPrintQueue) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsPrintQueue> for super::super::System::Com::IDispatch { fn from(value: &IADsPrintQueue) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsPrintQueue { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsPrintQueue { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsPrintQueue_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrprinterpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrmodel: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdatatype: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrprintprocessor: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdescription: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrlocation: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dastarttime: f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dauntiltime: f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lndefaultjobpriority: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnpriority: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrbannerpage: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vprintdevices: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vnetaddresses: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsPrintQueueOperations(pub ::windows::core::IUnknown); impl IADsPrintQueueOperations { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } pub unsafe fn Status(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn PrintJobs(&self) -> ::windows::core::Result<IADsCollection> { let mut result__: <IADsCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IADsCollection>(result__) } pub unsafe fn Pause(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Resume(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Purge(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IADsPrintQueueOperations { type Vtable = IADsPrintQueueOperations_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x124be5c0_156e_11cf_a986_00aa006bc149); } impl ::core::convert::From<IADsPrintQueueOperations> for ::windows::core::IUnknown { fn from(value: IADsPrintQueueOperations) -> Self { value.0 } } impl ::core::convert::From<&IADsPrintQueueOperations> for ::windows::core::IUnknown { fn from(value: &IADsPrintQueueOperations) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsPrintQueueOperations { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsPrintQueueOperations { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsPrintQueueOperations> for IADs { fn from(value: IADsPrintQueueOperations) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsPrintQueueOperations> for IADs { fn from(value: &IADsPrintQueueOperations) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsPrintQueueOperations { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsPrintQueueOperations { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsPrintQueueOperations> for super::super::System::Com::IDispatch { fn from(value: IADsPrintQueueOperations) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsPrintQueueOperations> for super::super::System::Com::IDispatch { fn from(value: &IADsPrintQueueOperations) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsPrintQueueOperations { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsPrintQueueOperations { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsPrintQueueOperations_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsProperty(pub ::windows::core::IUnknown); impl IADsProperty { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn OID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetOID<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstroid: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), bstroid.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Syntax(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetSyntax<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrsyntax: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), bstrsyntax.into_param().abi()).ok() } pub unsafe fn MaxRange(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMaxRange(&self, lnmaxrange: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnmaxrange)).ok() } pub unsafe fn MinRange(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMinRange(&self, lnminrange: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnminrange)).ok() } pub unsafe fn MultiValued(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetMultiValued(&self, fmultivalued: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), ::core::mem::transmute(fmultivalued)).ok() } pub unsafe fn Qualifiers(&self) -> ::windows::core::Result<IADsCollection> { let mut result__: <IADsCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IADsCollection>(result__) } } unsafe impl ::windows::core::Interface for IADsProperty { type Vtable = IADsProperty_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc8f93dd3_4ae0_11cf_9e73_00aa004a5691); } impl ::core::convert::From<IADsProperty> for ::windows::core::IUnknown { fn from(value: IADsProperty) -> Self { value.0 } } impl ::core::convert::From<&IADsProperty> for ::windows::core::IUnknown { fn from(value: &IADsProperty) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsProperty { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsProperty { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsProperty> for IADs { fn from(value: IADsProperty) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsProperty> for IADs { fn from(value: &IADsProperty) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsProperty { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsProperty { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsProperty> for super::super::System::Com::IDispatch { fn from(value: IADsProperty) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsProperty> for super::super::System::Com::IDispatch { fn from(value: &IADsProperty) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsProperty { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsProperty { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsProperty_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstroid: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrsyntax: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnmaxrange: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnminrange: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fmultivalued: i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqualifiers: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsPropertyEntry(pub ::windows::core::IUnknown); impl IADsPropertyEntry { pub unsafe fn Clear(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), bstrname.into_param().abi()).ok() } pub unsafe fn ADsType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetADsType(&self, lnadstype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnadstype)).ok() } pub unsafe fn ControlCode(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetControlCode(&self, lncontrolcode: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Values(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetValues<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vvalues: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), vvalues.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsPropertyEntry { type Vtable = IADsPropertyEntry_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x05792c8e_941f_11d0_8529_00c04fd8d503); } impl ::core::convert::From<IADsPropertyEntry> for ::windows::core::IUnknown { fn from(value: IADsPropertyEntry) -> Self { value.0 } } impl ::core::convert::From<&IADsPropertyEntry> for ::windows::core::IUnknown { fn from(value: &IADsPropertyEntry) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsPropertyEntry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsPropertyEntry { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsPropertyEntry> for super::super::System::Com::IDispatch { fn from(value: IADsPropertyEntry) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsPropertyEntry> for super::super::System::Com::IDispatch { fn from(value: &IADsPropertyEntry) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsPropertyEntry { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsPropertyEntry { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsPropertyEntry_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnadstype: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vvalues: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsPropertyList(pub ::windows::core::IUnknown); impl IADsPropertyList { pub unsafe fn PropertyCount(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Next(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } pub unsafe fn Skip(&self, celements: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(celements)).ok() } pub unsafe fn Reset(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Item<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, varindex: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), varindex.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetPropertyItem<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0, lnadstype: i32) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), ::core::mem::transmute(lnadstype), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutPropertyItem<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vardata: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), vardata.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ResetPropertyItem<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, varentry: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), varentry.into_param().abi()).ok() } pub unsafe fn PurgePropertyList(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IADsPropertyList { type Vtable = IADsPropertyList_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc6f602b6_8f69_11d0_8528_00c04fd8d503); } impl ::core::convert::From<IADsPropertyList> for ::windows::core::IUnknown { fn from(value: IADsPropertyList) -> Self { value.0 } } impl ::core::convert::From<&IADsPropertyList> for ::windows::core::IUnknown { fn from(value: &IADsPropertyList) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsPropertyList { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsPropertyList { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsPropertyList> for super::super::System::Com::IDispatch { fn from(value: IADsPropertyList) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsPropertyList> for super::super::System::Com::IDispatch { fn from(value: &IADsPropertyList) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsPropertyList { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsPropertyList { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsPropertyList_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plcount: *mut i32) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvariant: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, celements: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, varindex: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pvariant: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lnadstype: i32, pvariant: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vardata: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, varentry: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsPropertyValue(pub ::windows::core::IUnknown); impl IADsPropertyValue { pub unsafe fn Clear(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn ADsType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetADsType(&self, lnadstype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnadstype)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DNString(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDNString<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdnstring: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), bstrdnstring.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CaseExactString(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetCaseExactString<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrcaseexactstring: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), bstrcaseexactstring.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CaseIgnoreString(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetCaseIgnoreString<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrcaseignorestring: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrcaseignorestring.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PrintableString(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPrintableString<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrprintablestring: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrprintablestring.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn NumericString(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetNumericString<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrnumericstring: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), bstrnumericstring.into_param().abi()).ok() } pub unsafe fn Boolean(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetBoolean(&self, lnboolean: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnboolean)).ok() } pub unsafe fn Integer(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetInteger(&self, lninteger: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), ::core::mem::transmute(lninteger)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn OctetString(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetOctetString<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, voctetstring: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), voctetstring.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SecurityDescriptor(&self) -> ::windows::core::Result<super::super::System::Com::IDispatch> { let mut result__: <super::super::System::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::IDispatch>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetSecurityDescriptor<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch>>(&self, psecuritydescriptor: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), psecuritydescriptor.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn LargeInteger(&self) -> ::windows::core::Result<super::super::System::Com::IDispatch> { let mut result__: <super::super::System::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::IDispatch>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetLargeInteger<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch>>(&self, plargeinteger: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), plargeinteger.into_param().abi()).ok() } pub unsafe fn UTCTime(&self) -> ::windows::core::Result<f64> { let mut result__: <f64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), &mut result__).from_abi::<f64>(result__) } pub unsafe fn SetUTCTime(&self, dautctime: f64) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), ::core::mem::transmute(dautctime)).ok() } } unsafe impl ::windows::core::Interface for IADsPropertyValue { type Vtable = IADsPropertyValue_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x79fa9ad0_a97c_11d0_8534_00c04fd8d503); } impl ::core::convert::From<IADsPropertyValue> for ::windows::core::IUnknown { fn from(value: IADsPropertyValue) -> Self { value.0 } } impl ::core::convert::From<&IADsPropertyValue> for ::windows::core::IUnknown { fn from(value: &IADsPropertyValue) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsPropertyValue { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsPropertyValue { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsPropertyValue> for super::super::System::Com::IDispatch { fn from(value: IADsPropertyValue) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsPropertyValue> for super::super::System::Com::IDispatch { fn from(value: &IADsPropertyValue) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsPropertyValue { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsPropertyValue { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsPropertyValue_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnadstype: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdnstring: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrcaseexactstring: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrcaseignorestring: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrprintablestring: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrnumericstring: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnboolean: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lninteger: i32) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, voctetstring: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psecuritydescriptor: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plargeinteger: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dautctime: f64) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsPropertyValue2(pub ::windows::core::IUnknown); impl IADsPropertyValue2 { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetObjectProperty(&self, lnadstype: *mut i32, pvprop: *mut super::super::System::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnadstype), ::core::mem::transmute(pvprop)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutObjectProperty<'a, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lnadstype: i32, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnadstype), vprop.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsPropertyValue2 { type Vtable = IADsPropertyValue2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x306e831c_5bc7_11d1_a3b8_00c04fb950dc); } impl ::core::convert::From<IADsPropertyValue2> for ::windows::core::IUnknown { fn from(value: IADsPropertyValue2) -> Self { value.0 } } impl ::core::convert::From<&IADsPropertyValue2> for ::windows::core::IUnknown { fn from(value: &IADsPropertyValue2) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsPropertyValue2 { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsPropertyValue2 { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsPropertyValue2> for super::super::System::Com::IDispatch { fn from(value: IADsPropertyValue2) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsPropertyValue2> for super::super::System::Com::IDispatch { fn from(value: &IADsPropertyValue2) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsPropertyValue2 { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsPropertyValue2 { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsPropertyValue2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnadstype: *mut i32, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnadstype: i32, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsReplicaPointer(pub ::windows::core::IUnknown); impl IADsReplicaPointer { #[cfg(feature = "Win32_Foundation")] pub unsafe fn ServerName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetServerName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrservername: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), bstrservername.into_param().abi()).ok() } pub unsafe fn ReplicaType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetReplicaType(&self, lnreplicatype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnreplicatype)).ok() } pub unsafe fn ReplicaNumber(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetReplicaNumber(&self, lnreplicanumber: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnreplicanumber)).ok() } pub unsafe fn Count(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetCount(&self, lncount: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncount)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ReplicaAddressHints(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetReplicaAddressHints<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vreplicaaddresshints: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), vreplicaaddresshints.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsReplicaPointer { type Vtable = IADsReplicaPointer_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf60fb803_4080_11d1_a3ac_00c04fb950dc); } impl ::core::convert::From<IADsReplicaPointer> for ::windows::core::IUnknown { fn from(value: IADsReplicaPointer) -> Self { value.0 } } impl ::core::convert::From<&IADsReplicaPointer> for ::windows::core::IUnknown { fn from(value: &IADsReplicaPointer) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsReplicaPointer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsReplicaPointer { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsReplicaPointer> for super::super::System::Com::IDispatch { fn from(value: IADsReplicaPointer) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsReplicaPointer> for super::super::System::Com::IDispatch { fn from(value: &IADsReplicaPointer) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsReplicaPointer { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsReplicaPointer { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsReplicaPointer_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrservername: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnreplicatype: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnreplicanumber: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncount: i32) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vreplicaaddresshints: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsResource(pub ::windows::core::IUnknown); impl IADsResource { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn User(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn UserPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Path(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn LockCount(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } } unsafe impl ::windows::core::Interface for IADsResource { type Vtable = IADsResource_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x34a05b20_4aab_11cf_ae2c_00aa006ebfb9); } impl ::core::convert::From<IADsResource> for ::windows::core::IUnknown { fn from(value: IADsResource) -> Self { value.0 } } impl ::core::convert::From<&IADsResource> for ::windows::core::IUnknown { fn from(value: &IADsResource) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsResource { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsResource { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsResource> for IADs { fn from(value: IADsResource) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsResource> for IADs { fn from(value: &IADsResource) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsResource { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsResource { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsResource> for super::super::System::Com::IDispatch { fn from(value: IADsResource) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsResource> for super::super::System::Com::IDispatch { fn from(value: &IADsResource) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsResource { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsResource { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsResource_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsSecurityDescriptor(pub ::windows::core::IUnknown); impl IADsSecurityDescriptor { pub unsafe fn Revision(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetRevision(&self, lnrevision: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnrevision)).ok() } pub unsafe fn Control(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetControl(&self, lncontrol: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrol)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Owner(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetOwner<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrowner: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), bstrowner.into_param().abi()).ok() } pub unsafe fn OwnerDefaulted(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetOwnerDefaulted(&self, fownerdefaulted: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(fownerdefaulted)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Group(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetGroup<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrgroup: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrgroup.into_param().abi()).ok() } pub unsafe fn GroupDefaulted(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetGroupDefaulted(&self, fgroupdefaulted: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(fgroupdefaulted)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn DiscretionaryAcl(&self) -> ::windows::core::Result<super::super::System::Com::IDispatch> { let mut result__: <super::super::System::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::IDispatch>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetDiscretionaryAcl<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch>>(&self, pdiscretionaryacl: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), pdiscretionaryacl.into_param().abi()).ok() } pub unsafe fn DaclDefaulted(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetDaclDefaulted(&self, fdacldefaulted: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(fdacldefaulted)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SystemAcl(&self) -> ::windows::core::Result<super::super::System::Com::IDispatch> { let mut result__: <super::super::System::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::IDispatch>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetSystemAcl<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch>>(&self, psystemacl: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), psystemacl.into_param().abi()).ok() } pub unsafe fn SaclDefaulted(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetSaclDefaulted(&self, fsacldefaulted: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), ::core::mem::transmute(fsacldefaulted)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CopySecurityDescriptor(&self) -> ::windows::core::Result<super::super::System::Com::IDispatch> { let mut result__: <super::super::System::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IADsSecurityDescriptor { type Vtable = IADsSecurityDescriptor_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb8c787ca_9bdd_11d0_852c_00c04fd8d503); } impl ::core::convert::From<IADsSecurityDescriptor> for ::windows::core::IUnknown { fn from(value: IADsSecurityDescriptor) -> Self { value.0 } } impl ::core::convert::From<&IADsSecurityDescriptor> for ::windows::core::IUnknown { fn from(value: &IADsSecurityDescriptor) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsSecurityDescriptor { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsSecurityDescriptor { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsSecurityDescriptor> for super::super::System::Com::IDispatch { fn from(value: IADsSecurityDescriptor) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsSecurityDescriptor> for super::super::System::Com::IDispatch { fn from(value: &IADsSecurityDescriptor) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsSecurityDescriptor { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsSecurityDescriptor { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsSecurityDescriptor_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnrevision: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrol: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrowner: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fownerdefaulted: i16) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrgroup: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fgroupdefaulted: i16) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pdiscretionaryacl: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fdacldefaulted: i16) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psystemacl: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fsacldefaulted: i16) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppsecuritydescriptor: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsSecurityUtility(pub ::windows::core::IUnknown); impl IADsSecurityUtility { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetSecurityDescriptor<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, varpath: Param0, lpathformat: i32, lformat: i32) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), varpath.into_param().abi(), ::core::mem::transmute(lpathformat), ::core::mem::transmute(lformat), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetSecurityDescriptor<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, varpath: Param0, lpathformat: i32, vardata: Param2, ldataformat: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), varpath.into_param().abi(), ::core::mem::transmute(lpathformat), vardata.into_param().abi(), ::core::mem::transmute(ldataformat)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ConvertSecurityDescriptor<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, varsd: Param0, ldataformat: i32, loutformat: i32) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), varsd.into_param().abi(), ::core::mem::transmute(ldataformat), ::core::mem::transmute(loutformat), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } pub unsafe fn SecurityMask(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetSecurityMask(&self, lnsecuritymask: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnsecuritymask)).ok() } } unsafe impl ::windows::core::Interface for IADsSecurityUtility { type Vtable = IADsSecurityUtility_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa63251b2_5f21_474b_ab52_4a8efad10895); } impl ::core::convert::From<IADsSecurityUtility> for ::windows::core::IUnknown { fn from(value: IADsSecurityUtility) -> Self { value.0 } } impl ::core::convert::From<&IADsSecurityUtility> for ::windows::core::IUnknown { fn from(value: &IADsSecurityUtility) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsSecurityUtility { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsSecurityUtility { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsSecurityUtility> for super::super::System::Com::IDispatch { fn from(value: IADsSecurityUtility) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsSecurityUtility> for super::super::System::Com::IDispatch { fn from(value: &IADsSecurityUtility) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsSecurityUtility { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsSecurityUtility { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsSecurityUtility_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, varpath: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lpathformat: i32, lformat: i32, pvariant: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, varpath: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lpathformat: i32, vardata: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, ldataformat: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, varsd: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, ldataformat: i32, loutformat: i32, presult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnsecuritymask: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsService(pub ::windows::core::IUnknown); impl IADsService { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn HostComputer(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetHostComputer<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrhostcomputer: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), bstrhostcomputer.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DisplayName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDisplayName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdisplayname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), bstrdisplayname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Version(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetVersion<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrversion: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), bstrversion.into_param().abi()).ok() } pub unsafe fn ServiceType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetServiceType(&self, lnservicetype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnservicetype)).ok() } pub unsafe fn StartType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetStartType(&self, lnstarttype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnstarttype)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Path(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPath<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrpath: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), bstrpath.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn StartupParameters(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetStartupParameters<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrstartupparameters: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), bstrstartupparameters.into_param().abi()).ok() } pub unsafe fn ErrorControl(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetErrorControl(&self, lnerrorcontrol: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnerrorcontrol)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn LoadOrderGroup(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).36)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLoadOrderGroup<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrloadordergroup: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).37)(::core::mem::transmute_copy(self), bstrloadordergroup.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ServiceAccountName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).38)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetServiceAccountName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrserviceaccountname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).39)(::core::mem::transmute_copy(self), bstrserviceaccountname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ServiceAccountPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).40)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetServiceAccountPath<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrserviceaccountpath: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).41)(::core::mem::transmute_copy(self), bstrserviceaccountpath.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Dependencies(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).42)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetDependencies<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vdependencies: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).43)(::core::mem::transmute_copy(self), vdependencies.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsService { type Vtable = IADsService_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x68af66e0_31ca_11cf_a98a_00aa006bc149); } impl ::core::convert::From<IADsService> for ::windows::core::IUnknown { fn from(value: IADsService) -> Self { value.0 } } impl ::core::convert::From<&IADsService> for ::windows::core::IUnknown { fn from(value: &IADsService) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsService { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsService { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsService> for IADs { fn from(value: IADsService) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsService> for IADs { fn from(value: &IADsService) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsService { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsService { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsService> for super::super::System::Com::IDispatch { fn from(value: IADsService) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsService> for super::super::System::Com::IDispatch { fn from(value: &IADsService) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsService { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsService { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsService_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrhostcomputer: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdisplayname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrversion: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnservicetype: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnstarttype: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrstartupparameters: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnerrorcontrol: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrloadordergroup: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrserviceaccountname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrserviceaccountpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vdependencies: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsServiceOperations(pub ::windows::core::IUnknown); impl IADsServiceOperations { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } pub unsafe fn Status(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn Start(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Stop(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Pause(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Continue(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPassword<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrnewpassword: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), bstrnewpassword.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsServiceOperations { type Vtable = IADsServiceOperations_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5d7b33f0_31ca_11cf_a98a_00aa006bc149); } impl ::core::convert::From<IADsServiceOperations> for ::windows::core::IUnknown { fn from(value: IADsServiceOperations) -> Self { value.0 } } impl ::core::convert::From<&IADsServiceOperations> for ::windows::core::IUnknown { fn from(value: &IADsServiceOperations) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsServiceOperations { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsServiceOperations { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsServiceOperations> for IADs { fn from(value: IADsServiceOperations) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsServiceOperations> for IADs { fn from(value: &IADsServiceOperations) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsServiceOperations { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsServiceOperations { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsServiceOperations> for super::super::System::Com::IDispatch { fn from(value: IADsServiceOperations) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsServiceOperations> for super::super::System::Com::IDispatch { fn from(value: &IADsServiceOperations) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsServiceOperations { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsServiceOperations { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsServiceOperations_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrnewpassword: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsSession(pub ::windows::core::IUnknown); impl IADsSession { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn User(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn UserPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Computer(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ComputerPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn ConnectTime(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn IdleTime(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } } unsafe impl ::windows::core::Interface for IADsSession { type Vtable = IADsSession_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x398b7da0_4aab_11cf_ae2c_00aa006ebfb9); } impl ::core::convert::From<IADsSession> for ::windows::core::IUnknown { fn from(value: IADsSession) -> Self { value.0 } } impl ::core::convert::From<&IADsSession> for ::windows::core::IUnknown { fn from(value: &IADsSession) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsSession { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsSession { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsSession> for IADs { fn from(value: IADsSession) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsSession> for IADs { fn from(value: &IADsSession) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsSession { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsSession { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsSession> for super::super::System::Com::IDispatch { fn from(value: IADsSession) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsSession> for super::super::System::Com::IDispatch { fn from(value: &IADsSession) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsSession { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsSession { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsSession_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsSyntax(pub ::windows::core::IUnknown); impl IADsSyntax { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } pub unsafe fn OleAutoDataType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetOleAutoDataType(&self, lnoleautodatatype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnoleautodatatype)).ok() } } unsafe impl ::windows::core::Interface for IADsSyntax { type Vtable = IADsSyntax_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc8f93dd2_4ae0_11cf_9e73_00aa004a5691); } impl ::core::convert::From<IADsSyntax> for ::windows::core::IUnknown { fn from(value: IADsSyntax) -> Self { value.0 } } impl ::core::convert::From<&IADsSyntax> for ::windows::core::IUnknown { fn from(value: &IADsSyntax) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsSyntax { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsSyntax { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsSyntax> for IADs { fn from(value: IADsSyntax) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsSyntax> for IADs { fn from(value: &IADsSyntax) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsSyntax { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsSyntax { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsSyntax> for super::super::System::Com::IDispatch { fn from(value: IADsSyntax) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsSyntax> for super::super::System::Com::IDispatch { fn from(value: &IADsSyntax) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsSyntax { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsSyntax { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsSyntax_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnoleautodatatype: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsTimestamp(pub ::windows::core::IUnknown); impl IADsTimestamp { pub unsafe fn WholeSeconds(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetWholeSeconds(&self, lnwholeseconds: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnwholeseconds)).ok() } pub unsafe fn EventID(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetEventID(&self, lneventid: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(lneventid)).ok() } } unsafe impl ::windows::core::Interface for IADsTimestamp { type Vtable = IADsTimestamp_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb2f5a901_4080_11d1_a3ac_00c04fb950dc); } impl ::core::convert::From<IADsTimestamp> for ::windows::core::IUnknown { fn from(value: IADsTimestamp) -> Self { value.0 } } impl ::core::convert::From<&IADsTimestamp> for ::windows::core::IUnknown { fn from(value: &IADsTimestamp) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsTimestamp { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsTimestamp { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsTimestamp> for super::super::System::Com::IDispatch { fn from(value: IADsTimestamp) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsTimestamp> for super::super::System::Com::IDispatch { fn from(value: &IADsTimestamp) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsTimestamp { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsTimestamp { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsTimestamp_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnwholeseconds: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lneventid: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsTypedName(pub ::windows::core::IUnknown); impl IADsTypedName { #[cfg(feature = "Win32_Foundation")] pub unsafe fn ObjectName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetObjectName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrobjectname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), bstrobjectname.into_param().abi()).ok() } pub unsafe fn Level(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetLevel(&self, lnlevel: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnlevel)).ok() } pub unsafe fn Interval(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetInterval(&self, lninterval: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(lninterval)).ok() } } unsafe impl ::windows::core::Interface for IADsTypedName { type Vtable = IADsTypedName_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb371a349_4080_11d1_a3ac_00c04fb950dc); } impl ::core::convert::From<IADsTypedName> for ::windows::core::IUnknown { fn from(value: IADsTypedName) -> Self { value.0 } } impl ::core::convert::From<&IADsTypedName> for ::windows::core::IUnknown { fn from(value: &IADsTypedName) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsTypedName { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsTypedName { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsTypedName> for super::super::System::Com::IDispatch { fn from(value: IADsTypedName) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsTypedName> for super::super::System::Com::IDispatch { fn from(value: &IADsTypedName) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsTypedName { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsTypedName { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsTypedName_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrobjectname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnlevel: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lninterval: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsUser(pub ::windows::core::IUnknown); impl IADsUser { pub unsafe fn GetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GUID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parent(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Schema(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetInfo(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, bstrname: Param0, vprop: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrname: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrname.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, lncontrolcode: i32, bstrname: Param1, vprop: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lncontrolcode), bstrname.into_param().abi(), vprop.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetInfoEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vproperties: Param0, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), vproperties.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn BadLoginAddress(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn BadLoginCount(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn LastLogin(&self) -> ::windows::core::Result<f64> { let mut result__: <f64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<f64>(result__) } pub unsafe fn LastLogoff(&self) -> ::windows::core::Result<f64> { let mut result__: <f64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<f64>(result__) } pub unsafe fn LastFailedLogin(&self) -> ::windows::core::Result<f64> { let mut result__: <f64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), &mut result__).from_abi::<f64>(result__) } pub unsafe fn PasswordLastChanged(&self) -> ::windows::core::Result<f64> { let mut result__: <f64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<f64>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Description(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDescription<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdescription: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), bstrdescription.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Division(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDivision<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdivision: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), bstrdivision.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Department(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDepartment<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdepartment: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), bstrdepartment.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn EmployeeID(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetEmployeeID<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstremployeeid: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), bstremployeeid.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn FullName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetFullName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrfullname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), bstrfullname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn FirstName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).36)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetFirstName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrfirstname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).37)(::core::mem::transmute_copy(self), bstrfirstname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn LastName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).38)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLastName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrlastname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).39)(::core::mem::transmute_copy(self), bstrlastname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn OtherName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).40)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetOtherName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrothername: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).41)(::core::mem::transmute_copy(self), bstrothername.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn NamePrefix(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).42)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetNamePrefix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrnameprefix: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).43)(::core::mem::transmute_copy(self), bstrnameprefix.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn NameSuffix(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).44)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetNameSuffix<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrnamesuffix: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).45)(::core::mem::transmute_copy(self), bstrnamesuffix.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Title(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).46)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetTitle<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrtitle: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).47)(::core::mem::transmute_copy(self), bstrtitle.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Manager(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).48)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetManager<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrmanager: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).49)(::core::mem::transmute_copy(self), bstrmanager.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn TelephoneHome(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).50)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetTelephoneHome<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vtelephonehome: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).51)(::core::mem::transmute_copy(self), vtelephonehome.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn TelephoneMobile(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).52)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetTelephoneMobile<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vtelephonemobile: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).53)(::core::mem::transmute_copy(self), vtelephonemobile.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn TelephoneNumber(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).54)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetTelephoneNumber<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vtelephonenumber: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).55)(::core::mem::transmute_copy(self), vtelephonenumber.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn TelephonePager(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).56)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetTelephonePager<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vtelephonepager: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).57)(::core::mem::transmute_copy(self), vtelephonepager.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn FaxNumber(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).58)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetFaxNumber<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vfaxnumber: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).59)(::core::mem::transmute_copy(self), vfaxnumber.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn OfficeLocations(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).60)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetOfficeLocations<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vofficelocations: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).61)(::core::mem::transmute_copy(self), vofficelocations.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PostalAddresses(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).62)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetPostalAddresses<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vpostaladdresses: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).63)(::core::mem::transmute_copy(self), vpostaladdresses.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PostalCodes(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).64)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetPostalCodes<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vpostalcodes: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).65)(::core::mem::transmute_copy(self), vpostalcodes.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SeeAlso(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).66)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetSeeAlso<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vseealso: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).67)(::core::mem::transmute_copy(self), vseealso.into_param().abi()).ok() } pub unsafe fn AccountDisabled(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).68)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetAccountDisabled(&self, faccountdisabled: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).69)(::core::mem::transmute_copy(self), ::core::mem::transmute(faccountdisabled)).ok() } pub unsafe fn AccountExpirationDate(&self) -> ::windows::core::Result<f64> { let mut result__: <f64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).70)(::core::mem::transmute_copy(self), &mut result__).from_abi::<f64>(result__) } pub unsafe fn SetAccountExpirationDate(&self, daaccountexpirationdate: f64) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).71)(::core::mem::transmute_copy(self), ::core::mem::transmute(daaccountexpirationdate)).ok() } pub unsafe fn GraceLoginsAllowed(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).72)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetGraceLoginsAllowed(&self, lngraceloginsallowed: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).73)(::core::mem::transmute_copy(self), ::core::mem::transmute(lngraceloginsallowed)).ok() } pub unsafe fn GraceLoginsRemaining(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).74)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetGraceLoginsRemaining(&self, lngraceloginsremaining: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).75)(::core::mem::transmute_copy(self), ::core::mem::transmute(lngraceloginsremaining)).ok() } pub unsafe fn IsAccountLocked(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).76)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetIsAccountLocked(&self, fisaccountlocked: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).77)(::core::mem::transmute_copy(self), ::core::mem::transmute(fisaccountlocked)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn LoginHours(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).78)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetLoginHours<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vloginhours: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).79)(::core::mem::transmute_copy(self), vloginhours.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn LoginWorkstations(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).80)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetLoginWorkstations<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vloginworkstations: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).81)(::core::mem::transmute_copy(self), vloginworkstations.into_param().abi()).ok() } pub unsafe fn MaxLogins(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).82)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMaxLogins(&self, lnmaxlogins: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).83)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnmaxlogins)).ok() } pub unsafe fn MaxStorage(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).84)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMaxStorage(&self, lnmaxstorage: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).85)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnmaxstorage)).ok() } pub unsafe fn PasswordExpirationDate(&self) -> ::windows::core::Result<f64> { let mut result__: <f64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).86)(::core::mem::transmute_copy(self), &mut result__).from_abi::<f64>(result__) } pub unsafe fn SetPasswordExpirationDate(&self, dapasswordexpirationdate: f64) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).87)(::core::mem::transmute_copy(self), ::core::mem::transmute(dapasswordexpirationdate)).ok() } pub unsafe fn PasswordMinimumLength(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).88)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetPasswordMinimumLength(&self, lnpasswordminimumlength: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).89)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnpasswordminimumlength)).ok() } pub unsafe fn PasswordRequired(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).90)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetPasswordRequired(&self, fpasswordrequired: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).91)(::core::mem::transmute_copy(self), ::core::mem::transmute(fpasswordrequired)).ok() } pub unsafe fn RequireUniquePassword(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).92)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetRequireUniquePassword(&self, frequireuniquepassword: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).93)(::core::mem::transmute_copy(self), ::core::mem::transmute(frequireuniquepassword)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn EmailAddress(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).94)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetEmailAddress<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstremailaddress: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).95)(::core::mem::transmute_copy(self), bstremailaddress.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn HomeDirectory(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).96)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetHomeDirectory<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrhomedirectory: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).97)(::core::mem::transmute_copy(self), bstrhomedirectory.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Languages(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).98)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetLanguages<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vlanguages: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).99)(::core::mem::transmute_copy(self), vlanguages.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Profile(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).100)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetProfile<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrprofile: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).101)(::core::mem::transmute_copy(self), bstrprofile.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn LoginScript(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).102)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLoginScript<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrloginscript: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).103)(::core::mem::transmute_copy(self), bstrloginscript.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Picture(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).104)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetPicture<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, vpicture: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).105)(::core::mem::transmute_copy(self), vpicture.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn HomePage(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).106)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetHomePage<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrhomepage: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).107)(::core::mem::transmute_copy(self), bstrhomepage.into_param().abi()).ok() } pub unsafe fn Groups(&self) -> ::windows::core::Result<IADsMembers> { let mut result__: <IADsMembers as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).108)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IADsMembers>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPassword<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, newpassword: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).109)(::core::mem::transmute_copy(self), newpassword.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ChangePassword<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstroldpassword: Param0, bstrnewpassword: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).110)(::core::mem::transmute_copy(self), bstroldpassword.into_param().abi(), bstrnewpassword.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IADsUser { type Vtable = IADsUser_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3e37e320_17e2_11cf_abc4_02608c9e7553); } impl ::core::convert::From<IADsUser> for ::windows::core::IUnknown { fn from(value: IADsUser) -> Self { value.0 } } impl ::core::convert::From<&IADsUser> for ::windows::core::IUnknown { fn from(value: &IADsUser) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsUser { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsUser { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IADsUser> for IADs { fn from(value: IADsUser) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IADsUser> for IADs { fn from(value: &IADsUser) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for IADsUser { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IADs> for &IADsUser { fn into_param(self) -> ::windows::core::Param<'a, IADs> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsUser> for super::super::System::Com::IDispatch { fn from(value: IADsUser) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsUser> for super::super::System::Com::IDispatch { fn from(value: &IADsUser) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsUser { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsUser { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsUser_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvprop: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lncontrolcode: i32, bstrname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vprop: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vproperties: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut f64) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdescription: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdivision: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdepartment: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstremployeeid: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrfullname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrfirstname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrlastname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrothername: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrnameprefix: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrnamesuffix: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrtitle: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrmanager: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vtelephonehome: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vtelephonemobile: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vtelephonenumber: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vtelephonepager: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vfaxnumber: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vofficelocations: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vpostaladdresses: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vpostalcodes: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vseealso: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, faccountdisabled: i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, daaccountexpirationdate: f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lngraceloginsallowed: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lngraceloginsremaining: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fisaccountlocked: i16) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vloginhours: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vloginworkstations: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnmaxlogins: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnmaxstorage: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dapasswordexpirationdate: f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lnpasswordminimumlength: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, fpasswordrequired: i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, frequireuniquepassword: i16) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstremailaddress: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrhomedirectory: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vlanguages: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrprofile: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrloginscript: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vpicture: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrhomepage: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppgroups: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, newpassword: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstroldpassword: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bstrnewpassword: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IADsWinNTSystemInfo(pub ::windows::core::IUnknown); impl IADsWinNTSystemInfo { #[cfg(feature = "Win32_Foundation")] pub unsafe fn UserName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ComputerName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DomainName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PDC(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } } unsafe impl ::windows::core::Interface for IADsWinNTSystemInfo { type Vtable = IADsWinNTSystemInfo_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6c6d65dc_afd1_11d2_9cb9_0000f87a369e); } impl ::core::convert::From<IADsWinNTSystemInfo> for ::windows::core::IUnknown { fn from(value: IADsWinNTSystemInfo) -> Self { value.0 } } impl ::core::convert::From<&IADsWinNTSystemInfo> for ::windows::core::IUnknown { fn from(value: &IADsWinNTSystemInfo) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IADsWinNTSystemInfo { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IADsWinNTSystemInfo { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IADsWinNTSystemInfo> for super::super::System::Com::IDispatch { fn from(value: IADsWinNTSystemInfo) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IADsWinNTSystemInfo> for super::super::System::Com::IDispatch { fn from(value: &IADsWinNTSystemInfo) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IADsWinNTSystemInfo { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IADsWinNTSystemInfo { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IADsWinNTSystemInfo_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, retval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ICommonQuery(pub ::windows::core::IUnknown); impl ICommonQuery { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe fn OpenQueryWindow<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, hwndparent: Param0, pquerywnd: *mut OPENQUERYWINDOW, ppdataobject: *mut ::core::option::Option<super::super::System::Com::IDataObject>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), hwndparent.into_param().abi(), ::core::mem::transmute(pquerywnd), ::core::mem::transmute(ppdataobject)).ok() } } unsafe impl ::windows::core::Interface for ICommonQuery { type Vtable = ICommonQuery_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xab50dec0_6f1d_11d0_a1c4_00aa00c16e65); } impl ::core::convert::From<ICommonQuery> for ::windows::core::IUnknown { fn from(value: ICommonQuery) -> Self { value.0 } } impl ::core::convert::From<&ICommonQuery> for ::windows::core::IUnknown { fn from(value: &ICommonQuery) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ICommonQuery { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ICommonQuery { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct ICommonQuery_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hwndparent: super::super::Foundation::HWND, pquerywnd: *mut ::core::mem::ManuallyDrop<OPENQUERYWINDOW>, ppdataobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IDirectoryObject(pub ::windows::core::IUnknown); impl IDirectoryObject { #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetObjectInformation(&self) -> ::windows::core::Result<*mut ADS_OBJECT_INFO> { let mut result__: <*mut ADS_OBJECT_INFO as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<*mut ADS_OBJECT_INFO>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetObjectAttributes(&self, pattributenames: *const super::super::Foundation::PWSTR, dwnumberattributes: u32, ppattributeentries: *mut *mut ADS_ATTR_INFO, pdwnumattributesreturned: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(pattributenames), ::core::mem::transmute(dwnumberattributes), ::core::mem::transmute(ppattributeentries), ::core::mem::transmute(pdwnumattributesreturned)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetObjectAttributes(&self, pattributeentries: *const ADS_ATTR_INFO, dwnumattributes: u32) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(pattributeentries), ::core::mem::transmute(dwnumattributes), &mut result__).from_abi::<u32>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn CreateDSObject<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszrdnname: Param0, pattributeentries: *const ADS_ATTR_INFO, dwnumattributes: u32) -> ::windows::core::Result<super::super::System::Com::IDispatch> { let mut result__: <super::super::System::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), pszrdnname.into_param().abi(), ::core::mem::transmute(pattributeentries), ::core::mem::transmute(dwnumattributes), &mut result__).from_abi::<super::super::System::Com::IDispatch>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DeleteDSObject<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszrdnname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), pszrdnname.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IDirectoryObject { type Vtable = IDirectoryObject_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe798de2c_22e4_11d0_84fe_00c04fd8d503); } impl ::core::convert::From<IDirectoryObject> for ::windows::core::IUnknown { fn from(value: IDirectoryObject) -> Self { value.0 } } impl ::core::convert::From<&IDirectoryObject> for ::windows::core::IUnknown { fn from(value: &IDirectoryObject) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IDirectoryObject { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IDirectoryObject { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IDirectoryObject_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppobjinfo: *mut *mut ADS_OBJECT_INFO) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pattributenames: *const super::super::Foundation::PWSTR, dwnumberattributes: u32, ppattributeentries: *mut *mut ADS_ATTR_INFO, pdwnumattributesreturned: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pattributeentries: *const ADS_ATTR_INFO, dwnumattributes: u32, pdwnumattributesmodified: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszrdnname: super::super::Foundation::PWSTR, pattributeentries: *const ADS_ATTR_INFO, dwnumattributes: u32, ppobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszrdnname: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IDirectorySchemaMgmt(pub ::windows::core::IUnknown); impl IDirectorySchemaMgmt { #[cfg(feature = "Win32_Foundation")] pub unsafe fn EnumAttributes(&self, ppszattrnames: *const super::super::Foundation::PWSTR, dwnumattributes: u32, ppattrdefinition: *const *const ADS_ATTR_DEF, pdwnumattributes: *const u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(ppszattrnames), ::core::mem::transmute(dwnumattributes), ::core::mem::transmute(ppattrdefinition), ::core::mem::transmute(pdwnumattributes)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreateAttributeDefinition<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszattributename: Param0, pattributedefinition: *const ADS_ATTR_DEF) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), pszattributename.into_param().abi(), ::core::mem::transmute(pattributedefinition)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn WriteAttributeDefinition<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszattributename: Param0, pattributedefinition: *const ADS_ATTR_DEF) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), pszattributename.into_param().abi(), ::core::mem::transmute(pattributedefinition)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DeleteAttributeDefinition<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszattributename: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), pszattributename.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn EnumClasses(&self, ppszclassnames: *const super::super::Foundation::PWSTR, dwnumclasses: u32, ppclassdefinition: *const *const ADS_CLASS_DEF, pdwnumclasses: *const u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(ppszclassnames), ::core::mem::transmute(dwnumclasses), ::core::mem::transmute(ppclassdefinition), ::core::mem::transmute(pdwnumclasses)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn WriteClassDefinition<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszclassname: Param0, pclassdefinition: *const ADS_CLASS_DEF) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), pszclassname.into_param().abi(), ::core::mem::transmute(pclassdefinition)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreateClassDefinition<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszclassname: Param0, pclassdefinition: *const ADS_CLASS_DEF) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), pszclassname.into_param().abi(), ::core::mem::transmute(pclassdefinition)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DeleteClassDefinition<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszclassname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), pszclassname.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IDirectorySchemaMgmt { type Vtable = IDirectorySchemaMgmt_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x75db3b9c_a4d8_11d0_a79c_00c04fd8d5a8); } impl ::core::convert::From<IDirectorySchemaMgmt> for ::windows::core::IUnknown { fn from(value: IDirectorySchemaMgmt) -> Self { value.0 } } impl ::core::convert::From<&IDirectorySchemaMgmt> for ::windows::core::IUnknown { fn from(value: &IDirectorySchemaMgmt) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IDirectorySchemaMgmt { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IDirectorySchemaMgmt { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IDirectorySchemaMgmt_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszattrnames: *const super::super::Foundation::PWSTR, dwnumattributes: u32, ppattrdefinition: *const *const ADS_ATTR_DEF, pdwnumattributes: *const u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszattributename: super::super::Foundation::PWSTR, pattributedefinition: *const ADS_ATTR_DEF) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszattributename: super::super::Foundation::PWSTR, pattributedefinition: *const ADS_ATTR_DEF) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszattributename: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszclassnames: *const super::super::Foundation::PWSTR, dwnumclasses: u32, ppclassdefinition: *const *const ADS_CLASS_DEF, pdwnumclasses: *const u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszclassname: super::super::Foundation::PWSTR, pclassdefinition: *const ADS_CLASS_DEF) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszclassname: super::super::Foundation::PWSTR, pclassdefinition: *const ADS_CLASS_DEF) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszclassname: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IDirectorySearch(pub ::windows::core::IUnknown); impl IDirectorySearch { #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetSearchPreference(&self, psearchprefs: *const ads_searchpref_info, dwnumprefs: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(psearchprefs), ::core::mem::transmute(dwnumprefs)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ExecuteSearch<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszsearchfilter: Param0, pattributenames: *const super::super::Foundation::PWSTR, dwnumberattributes: u32) -> ::windows::core::Result<isize> { let mut result__: <isize as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), pszsearchfilter.into_param().abi(), ::core::mem::transmute(pattributenames), ::core::mem::transmute(dwnumberattributes), &mut result__).from_abi::<isize>(result__) } pub unsafe fn AbandonSearch(&self, phsearchresult: isize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(phsearchresult)).ok() } pub unsafe fn GetFirstRow(&self, hsearchresult: isize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(hsearchresult)).ok() } pub unsafe fn GetNextRow(&self, hsearchresult: isize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(hsearchresult)).ok() } pub unsafe fn GetPreviousRow(&self, hsearchresult: isize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(hsearchresult)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetNextColumnName(&self, hsearchhandle: isize) -> ::windows::core::Result<super::super::Foundation::PWSTR> { let mut result__: <super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(hsearchhandle), &mut result__).from_abi::<super::super::Foundation::PWSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetColumn<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, hsearchresult: isize, szcolumnname: Param1) -> ::windows::core::Result<ads_search_column> { let mut result__: <ads_search_column as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(hsearchresult), szcolumnname.into_param().abi(), &mut result__).from_abi::<ads_search_column>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn FreeColumn(&self, psearchcolumn: *const ads_search_column) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(psearchcolumn)).ok() } pub unsafe fn CloseSearchHandle(&self, hsearchresult: isize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(hsearchresult)).ok() } } unsafe impl ::windows::core::Interface for IDirectorySearch { type Vtable = IDirectorySearch_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x109ba8ec_92f0_11d0_a790_00c04fd8d5a8); } impl ::core::convert::From<IDirectorySearch> for ::windows::core::IUnknown { fn from(value: IDirectorySearch) -> Self { value.0 } } impl ::core::convert::From<&IDirectorySearch> for ::windows::core::IUnknown { fn from(value: &IDirectorySearch) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IDirectorySearch { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IDirectorySearch { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IDirectorySearch_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psearchprefs: *const ads_searchpref_info, dwnumprefs: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszsearchfilter: super::super::Foundation::PWSTR, pattributenames: *const super::super::Foundation::PWSTR, dwnumberattributes: u32, phsearchresult: *mut isize) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, phsearchresult: isize) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hsearchresult: isize) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hsearchresult: isize) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hsearchresult: isize) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hsearchhandle: isize, ppszcolumnname: *mut super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hsearchresult: isize, szcolumnname: super::super::Foundation::PWSTR, psearchcolumn: *mut ads_search_column) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psearchcolumn: *const ads_search_column) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hsearchresult: isize) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IDsAdminCreateObj(pub ::windows::core::IUnknown); impl IDsAdminCreateObj { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Initialize<'a, Param0: ::windows::core::IntoParam<'a, IADsContainer>, Param1: ::windows::core::IntoParam<'a, IADs>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, padscontainerobj: Param0, padscopysource: Param1, lpszclassname: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), padscontainerobj.into_param().abi(), padscopysource.into_param().abi(), lpszclassname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreateModal<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, hwndparent: Param0) -> ::windows::core::Result<IADs> { let mut result__: <IADs as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), hwndparent.into_param().abi(), &mut result__).from_abi::<IADs>(result__) } } unsafe impl ::windows::core::Interface for IDsAdminCreateObj { type Vtable = IDsAdminCreateObj_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x53554a38_f902_11d2_82b9_00c04f68928b); } impl ::core::convert::From<IDsAdminCreateObj> for ::windows::core::IUnknown { fn from(value: IDsAdminCreateObj) -> Self { value.0 } } impl ::core::convert::From<&IDsAdminCreateObj> for ::windows::core::IUnknown { fn from(value: &IDsAdminCreateObj) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IDsAdminCreateObj { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IDsAdminCreateObj { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IDsAdminCreateObj_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, padscontainerobj: ::windows::core::RawPtr, padscopysource: ::windows::core::RawPtr, lpszclassname: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hwndparent: super::super::Foundation::HWND, ppadsobj: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IDsAdminNewObj(pub ::windows::core::IUnknown); impl IDsAdminNewObj { #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetButtons<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>>(&self, ncurrindex: u32, bvalid: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(ncurrindex), bvalid.into_param().abi()).ok() } pub unsafe fn GetPageCounts(&self, pntotal: *mut i32, pnstartindex: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(pntotal), ::core::mem::transmute(pnstartindex)).ok() } } unsafe impl ::windows::core::Interface for IDsAdminNewObj { type Vtable = IDsAdminNewObj_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf2573587_e6fc_11d2_82af_00c04f68928b); } impl ::core::convert::From<IDsAdminNewObj> for ::windows::core::IUnknown { fn from(value: IDsAdminNewObj) -> Self { value.0 } } impl ::core::convert::From<&IDsAdminNewObj> for ::windows::core::IUnknown { fn from(value: &IDsAdminNewObj) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IDsAdminNewObj { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IDsAdminNewObj { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IDsAdminNewObj_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ncurrindex: u32, bvalid: super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pntotal: *mut i32, pnstartindex: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IDsAdminNewObjExt(pub ::windows::core::IUnknown); impl IDsAdminNewObjExt { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe fn Initialize<'a, Param0: ::windows::core::IntoParam<'a, IADsContainer>, Param1: ::windows::core::IntoParam<'a, IADs>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, IDsAdminNewObj>>(&self, padscontainerobj: Param0, padscopysource: Param1, lpszclassname: Param2, pdsadminnewobj: Param3, pdispinfo: *mut DSA_NEWOBJ_DISPINFO) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), padscontainerobj.into_param().abi(), padscopysource.into_param().abi(), lpszclassname.into_param().abi(), pdsadminnewobj.into_param().abi(), ::core::mem::transmute(pdispinfo)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls"))] pub unsafe fn AddPages<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::LPARAM>>(&self, lpfnaddpage: ::core::option::Option<super::super::UI::Controls::LPFNSVADDPROPSHEETPAGE>, lparam: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(lpfnaddpage), lparam.into_param().abi()).ok() } pub unsafe fn SetObject<'a, Param0: ::windows::core::IntoParam<'a, IADs>>(&self, padsobj: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), padsobj.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn WriteData<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, hwnd: Param0, ucontext: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), hwnd.into_param().abi(), ::core::mem::transmute(ucontext)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn OnError<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, hwnd: Param0, hr: ::windows::core::HRESULT, ucontext: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), hwnd.into_param().abi(), ::core::mem::transmute(hr), ::core::mem::transmute(ucontext)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetSummaryInfo(&self, pbstrtext: *mut super::super::Foundation::BSTR) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(pbstrtext)).ok() } } unsafe impl ::windows::core::Interface for IDsAdminNewObjExt { type Vtable = IDsAdminNewObjExt_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6088eae2_e7bf_11d2_82af_00c04f68928b); } impl ::core::convert::From<IDsAdminNewObjExt> for ::windows::core::IUnknown { fn from(value: IDsAdminNewObjExt) -> Self { value.0 } } impl ::core::convert::From<&IDsAdminNewObjExt> for ::windows::core::IUnknown { fn from(value: &IDsAdminNewObjExt) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IDsAdminNewObjExt { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IDsAdminNewObjExt { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IDsAdminNewObjExt_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, padscontainerobj: ::windows::core::RawPtr, padscopysource: ::windows::core::RawPtr, lpszclassname: super::super::Foundation::PWSTR, pdsadminnewobj: ::windows::core::RawPtr, pdispinfo: *mut DSA_NEWOBJ_DISPINFO) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lpfnaddpage: ::windows::core::RawPtr, lparam: super::super::Foundation::LPARAM) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, padsobj: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hwnd: super::super::Foundation::HWND, ucontext: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hwnd: super::super::Foundation::HWND, hr: ::windows::core::HRESULT, ucontext: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrtext: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IDsAdminNewObjPrimarySite(pub ::windows::core::IUnknown); impl IDsAdminNewObjPrimarySite { #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreateNew<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszname.into_param().abi()).ok() } pub unsafe fn Commit(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IDsAdminNewObjPrimarySite { type Vtable = IDsAdminNewObjPrimarySite_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbe2b487e_f904_11d2_82b9_00c04f68928b); } impl ::core::convert::From<IDsAdminNewObjPrimarySite> for ::windows::core::IUnknown { fn from(value: IDsAdminNewObjPrimarySite) -> Self { value.0 } } impl ::core::convert::From<&IDsAdminNewObjPrimarySite> for ::windows::core::IUnknown { fn from(value: &IDsAdminNewObjPrimarySite) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IDsAdminNewObjPrimarySite { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IDsAdminNewObjPrimarySite { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IDsAdminNewObjPrimarySite_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszname: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IDsAdminNotifyHandler(pub ::windows::core::IUnknown); impl IDsAdminNotifyHandler { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Initialize<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::IDataObject>>(&self, pextrainfo: Param0, pueventflags: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pextrainfo.into_param().abi(), ::core::mem::transmute(pueventflags)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn Begin<'a, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::IDataObject>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::IDataObject>>(&self, uevent: u32, parg1: Param1, parg2: Param2, puflags: *mut u32, pbstr: *mut super::super::Foundation::BSTR) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(uevent), parg1.into_param().abi(), parg2.into_param().abi(), ::core::mem::transmute(puflags), ::core::mem::transmute(pbstr)).ok() } pub unsafe fn Notify(&self, nitem: u32, uflags: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(nitem), ::core::mem::transmute(uflags)).ok() } pub unsafe fn End(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IDsAdminNotifyHandler { type Vtable = IDsAdminNotifyHandler_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe4a2b8b3_5a18_11d2_97c1_00a0c9a06d2d); } impl ::core::convert::From<IDsAdminNotifyHandler> for ::windows::core::IUnknown { fn from(value: IDsAdminNotifyHandler) -> Self { value.0 } } impl ::core::convert::From<&IDsAdminNotifyHandler> for ::windows::core::IUnknown { fn from(value: &IDsAdminNotifyHandler) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IDsAdminNotifyHandler { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IDsAdminNotifyHandler { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IDsAdminNotifyHandler_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pextrainfo: ::windows::core::RawPtr, pueventflags: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uevent: u32, parg1: ::windows::core::RawPtr, parg2: ::windows::core::RawPtr, puflags: *mut u32, pbstr: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, nitem: u32, uflags: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IDsBrowseDomainTree(pub ::windows::core::IUnknown); impl IDsBrowseDomainTree { #[cfg(feature = "Win32_Foundation")] pub unsafe fn BrowseTo<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, hwndparent: Param0, ppsztargetpath: *mut super::super::Foundation::PWSTR, dwflags: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), hwndparent.into_param().abi(), ::core::mem::transmute(ppsztargetpath), ::core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetDomains(&self, ppdomaintree: *mut *mut DOMAIN_TREE, dwflags: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(ppdomaintree), ::core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn FreeDomains(&self, ppdomaintree: *mut *mut DOMAIN_TREE) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(ppdomaintree)).ok() } pub unsafe fn FlushCachedDomains(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetComputer<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszcomputername: Param0, pszusername: Param1, pszpassword: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), pszcomputername.into_param().abi(), pszusername.into_param().abi(), pszpassword.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IDsBrowseDomainTree { type Vtable = IDsBrowseDomainTree_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7cabcf1e_78f5_11d2_960c_00c04fa31a86); } impl ::core::convert::From<IDsBrowseDomainTree> for ::windows::core::IUnknown { fn from(value: IDsBrowseDomainTree) -> Self { value.0 } } impl ::core::convert::From<&IDsBrowseDomainTree> for ::windows::core::IUnknown { fn from(value: &IDsBrowseDomainTree) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IDsBrowseDomainTree { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IDsBrowseDomainTree { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IDsBrowseDomainTree_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hwndparent: super::super::Foundation::HWND, ppsztargetpath: *mut super::super::Foundation::PWSTR, dwflags: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppdomaintree: *mut *mut DOMAIN_TREE, dwflags: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppdomaintree: *mut *mut DOMAIN_TREE) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszcomputername: super::super::Foundation::PWSTR, pszusername: super::super::Foundation::PWSTR, pszpassword: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IDsDisplaySpecifier(pub ::windows::core::IUnknown); impl IDsDisplaySpecifier { #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetServer<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszserver: Param0, pszusername: Param1, pszpassword: Param2, dwflags: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszserver.into_param().abi(), pszusername.into_param().abi(), pszpassword.into_param().abi(), ::core::mem::transmute(dwflags)).ok() } pub unsafe fn SetLanguageID(&self, langid: u16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(langid)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetDisplaySpecifier<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszobjectclass: Param0, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), pszobjectclass.into_param().abi(), ::core::mem::transmute(riid), ::core::mem::transmute(ppv)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIconLocation<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszobjectclass: Param0, dwflags: u32, pszbuffer: super::super::Foundation::PWSTR, cchbuffer: i32, presid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), pszobjectclass.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pszbuffer), ::core::mem::transmute(cchbuffer), ::core::mem::transmute(presid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe fn GetIcon<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszobjectclass: Param0, dwflags: u32, cxicon: i32, cyicon: i32) -> super::super::UI::WindowsAndMessaging::HICON { ::core::mem::transmute((::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), pszobjectclass.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(cxicon), ::core::mem::transmute(cyicon))) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetFriendlyClassName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszobjectclass: Param0, pszbuffer: super::super::Foundation::PWSTR, cchbuffer: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), pszobjectclass.into_param().abi(), ::core::mem::transmute(pszbuffer), ::core::mem::transmute(cchbuffer)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetFriendlyAttributeName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszobjectclass: Param0, pszattributename: Param1, pszbuffer: super::super::Foundation::PWSTR, cchbuffer: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), pszobjectclass.into_param().abi(), pszattributename.into_param().abi(), ::core::mem::transmute(pszbuffer), ::core::mem::transmute(cchbuffer)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn IsClassContainer<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszobjectclass: Param0, pszadspath: Param1, dwflags: u32) -> super::super::Foundation::BOOL { ::core::mem::transmute((::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), pszobjectclass.into_param().abi(), pszadspath.into_param().abi(), ::core::mem::transmute(dwflags))) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetClassCreationInfo<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszobjectclass: Param0, ppdscci: *mut *mut DSCLASSCREATIONINFO) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), pszobjectclass.into_param().abi(), ::core::mem::transmute(ppdscci)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn EnumClassAttributes<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::LPARAM>>(&self, pszobjectclass: Param0, pcbenum: ::core::option::Option<LPDSENUMATTRIBUTES>, lparam: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), pszobjectclass.into_param().abi(), ::core::mem::transmute(pcbenum), lparam.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetAttributeADsType<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszattributename: Param0) -> ADSTYPEENUM { ::core::mem::transmute((::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), pszattributename.into_param().abi())) } } unsafe impl ::windows::core::Interface for IDsDisplaySpecifier { type Vtable = IDsDisplaySpecifier_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1ab4a8c0_6a0b_11d2_ad49_00c04fa31a86); } impl ::core::convert::From<IDsDisplaySpecifier> for ::windows::core::IUnknown { fn from(value: IDsDisplaySpecifier) -> Self { value.0 } } impl ::core::convert::From<&IDsDisplaySpecifier> for ::windows::core::IUnknown { fn from(value: &IDsDisplaySpecifier) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IDsDisplaySpecifier { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IDsDisplaySpecifier { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IDsDisplaySpecifier_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszserver: super::super::Foundation::PWSTR, pszusername: super::super::Foundation::PWSTR, pszpassword: super::super::Foundation::PWSTR, dwflags: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, langid: u16) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectclass: super::super::Foundation::PWSTR, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectclass: super::super::Foundation::PWSTR, dwflags: u32, pszbuffer: super::super::Foundation::PWSTR, cchbuffer: i32, presid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectclass: super::super::Foundation::PWSTR, dwflags: u32, cxicon: i32, cyicon: i32) -> super::super::UI::WindowsAndMessaging::HICON, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectclass: super::super::Foundation::PWSTR, pszbuffer: super::super::Foundation::PWSTR, cchbuffer: i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectclass: super::super::Foundation::PWSTR, pszattributename: super::super::Foundation::PWSTR, pszbuffer: super::super::Foundation::PWSTR, cchbuffer: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectclass: super::super::Foundation::PWSTR, pszadspath: super::super::Foundation::PWSTR, dwflags: u32) -> super::super::Foundation::BOOL, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectclass: super::super::Foundation::PWSTR, ppdscci: *mut *mut DSCLASSCREATIONINFO) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectclass: super::super::Foundation::PWSTR, pcbenum: ::windows::core::RawPtr, lparam: super::super::Foundation::LPARAM) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszattributename: super::super::Foundation::PWSTR) -> ADSTYPEENUM, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IDsObjectPicker(pub ::windows::core::IUnknown); impl IDsObjectPicker { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Initialize(&self, pinitinfo: *mut DSOP_INIT_INFO) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(pinitinfo)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn InvokeDialog<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, hwndparent: Param0) -> ::windows::core::Result<super::super::System::Com::IDataObject> { let mut result__: <super::super::System::Com::IDataObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), hwndparent.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::IDataObject>(result__) } } unsafe impl ::windows::core::Interface for IDsObjectPicker { type Vtable = IDsObjectPicker_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0c87e64e_3b7a_11d2_b9e0_00c04fd8dbf7); } impl ::core::convert::From<IDsObjectPicker> for ::windows::core::IUnknown { fn from(value: IDsObjectPicker) -> Self { value.0 } } impl ::core::convert::From<&IDsObjectPicker> for ::windows::core::IUnknown { fn from(value: &IDsObjectPicker) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IDsObjectPicker { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IDsObjectPicker { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IDsObjectPicker_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pinitinfo: *mut DSOP_INIT_INFO) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hwndparent: super::super::Foundation::HWND, ppdoselections: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IDsObjectPickerCredentials(pub ::windows::core::IUnknown); impl IDsObjectPickerCredentials { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Initialize(&self, pinitinfo: *mut DSOP_INIT_INFO) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(pinitinfo)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn InvokeDialog<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, hwndparent: Param0) -> ::windows::core::Result<super::super::System::Com::IDataObject> { let mut result__: <super::super::System::Com::IDataObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), hwndparent.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::IDataObject>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetCredentials<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, szusername: Param0, szpassword: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), szusername.into_param().abi(), szpassword.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IDsObjectPickerCredentials { type Vtable = IDsObjectPickerCredentials_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe2d3ec9b_d041_445a_8f16_4748de8fb1cf); } impl ::core::convert::From<IDsObjectPickerCredentials> for ::windows::core::IUnknown { fn from(value: IDsObjectPickerCredentials) -> Self { value.0 } } impl ::core::convert::From<&IDsObjectPickerCredentials> for ::windows::core::IUnknown { fn from(value: &IDsObjectPickerCredentials) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IDsObjectPickerCredentials { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IDsObjectPickerCredentials { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IDsObjectPickerCredentials> for IDsObjectPicker { fn from(value: IDsObjectPickerCredentials) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IDsObjectPickerCredentials> for IDsObjectPicker { fn from(value: &IDsObjectPickerCredentials) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IDsObjectPicker> for IDsObjectPickerCredentials { fn into_param(self) -> ::windows::core::Param<'a, IDsObjectPicker> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IDsObjectPicker> for &IDsObjectPickerCredentials { fn into_param(self) -> ::windows::core::Param<'a, IDsObjectPicker> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IDsObjectPickerCredentials_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pinitinfo: *mut DSOP_INIT_INFO) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hwndparent: super::super::Foundation::HWND, ppdoselections: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, szusername: super::super::Foundation::PWSTR, szpassword: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IPersistQuery(pub ::windows::core::IUnknown); impl IPersistQuery { pub unsafe fn GetClassID(&self) -> ::windows::core::Result<::windows::core::GUID> { let mut result__: <::windows::core::GUID as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<::windows::core::GUID>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn WriteString<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, psection: Param0, pvaluename: Param1, pvalue: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), psection.into_param().abi(), pvaluename.into_param().abi(), pvalue.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ReadString<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, psection: Param0, pvaluename: Param1, pbuffer: super::super::Foundation::PWSTR, cchbuffer: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), psection.into_param().abi(), pvaluename.into_param().abi(), ::core::mem::transmute(pbuffer), ::core::mem::transmute(cchbuffer)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn WriteInt<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, psection: Param0, pvaluename: Param1, value: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), psection.into_param().abi(), pvaluename.into_param().abi(), ::core::mem::transmute(value)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ReadInt<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, psection: Param0, pvaluename: Param1, pvalue: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), psection.into_param().abi(), pvaluename.into_param().abi(), ::core::mem::transmute(pvalue)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn WriteStruct<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, psection: Param0, pvaluename: Param1, pstruct: *mut ::core::ffi::c_void, cbstruct: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), psection.into_param().abi(), pvaluename.into_param().abi(), ::core::mem::transmute(pstruct), ::core::mem::transmute(cbstruct)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ReadStruct<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, psection: Param0, pvaluename: Param1, pstruct: *mut ::core::ffi::c_void, cbstruct: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), psection.into_param().abi(), pvaluename.into_param().abi(), ::core::mem::transmute(pstruct), ::core::mem::transmute(cbstruct)).ok() } pub unsafe fn Clear(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IPersistQuery { type Vtable = IPersistQuery_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1a3114b8_a62e_11d0_a6c5_00a0c906af45); } impl ::core::convert::From<IPersistQuery> for ::windows::core::IUnknown { fn from(value: IPersistQuery) -> Self { value.0 } } impl ::core::convert::From<&IPersistQuery> for ::windows::core::IUnknown { fn from(value: &IPersistQuery) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPersistQuery { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPersistQuery { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IPersistQuery> for super::super::System::Com::IPersist { fn from(value: IPersistQuery) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IPersistQuery> for super::super::System::Com::IPersist { fn from(value: &IPersistQuery) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IPersist> for IPersistQuery { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IPersist> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IPersist> for &IPersistQuery { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IPersist> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IPersistQuery_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pclassid: *mut ::windows::core::GUID) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psection: super::super::Foundation::PWSTR, pvaluename: super::super::Foundation::PWSTR, pvalue: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psection: super::super::Foundation::PWSTR, pvaluename: super::super::Foundation::PWSTR, pbuffer: super::super::Foundation::PWSTR, cchbuffer: i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psection: super::super::Foundation::PWSTR, pvaluename: super::super::Foundation::PWSTR, value: i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psection: super::super::Foundation::PWSTR, pvaluename: super::super::Foundation::PWSTR, pvalue: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psection: super::super::Foundation::PWSTR, pvaluename: super::super::Foundation::PWSTR, pstruct: *mut ::core::ffi::c_void, cbstruct: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psection: super::super::Foundation::PWSTR, pvaluename: super::super::Foundation::PWSTR, pstruct: *mut ::core::ffi::c_void, cbstruct: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IPrivateDispatch(pub ::windows::core::IUnknown); impl IPrivateDispatch { pub unsafe fn ADSIInitializeDispatchManager(&self, dwextensionid: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwextensionid)).ok() } pub unsafe fn ADSIGetTypeInfoCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn ADSIGetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::super::System::Com::ITypeInfo> { let mut result__: <super::super::System::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::System::Com::ITypeInfo>(result__) } pub unsafe fn ADSIGetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const *const u16, cnames: u32, lcid: u32) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), &mut result__).from_abi::<i32>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ADSIInvoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut super::super::System::Com::VARIANT, pexcepinfo: *mut super::super::System::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } } unsafe impl ::windows::core::Interface for IPrivateDispatch { type Vtable = IPrivateDispatch_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x86ab4bbe_65f6_11d1_8c13_00c04fd8d503); } impl ::core::convert::From<IPrivateDispatch> for ::windows::core::IUnknown { fn from(value: IPrivateDispatch) -> Self { value.0 } } impl ::core::convert::From<&IPrivateDispatch> for ::windows::core::IUnknown { fn from(value: &IPrivateDispatch) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPrivateDispatch { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPrivateDispatch { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IPrivateDispatch_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwextensionid: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const *const u16, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IPrivateUnknown(pub ::windows::core::IUnknown); impl IPrivateUnknown { #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADSIInitializeObject<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, lpszusername: Param0, lpszpassword: Param1, lnreserved: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), lpszusername.into_param().abi(), lpszpassword.into_param().abi(), ::core::mem::transmute(lnreserved)).ok() } pub unsafe fn ADSIReleaseObject(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IPrivateUnknown { type Vtable = IPrivateUnknown_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x89126bab_6ead_11d1_8c18_00c04fd8d503); } impl ::core::convert::From<IPrivateUnknown> for ::windows::core::IUnknown { fn from(value: IPrivateUnknown) -> Self { value.0 } } impl ::core::convert::From<&IPrivateUnknown> for ::windows::core::IUnknown { fn from(value: &IPrivateUnknown) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPrivateUnknown { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPrivateUnknown { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IPrivateUnknown_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lpszusername: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lpszpassword: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lnreserved: i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IQueryForm(pub ::windows::core::IUnknown); impl IQueryForm { #[cfg(feature = "Win32_System_Registry")] pub unsafe fn Initialize<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Registry::HKEY>>(&self, hkform: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), hkform.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe fn AddForms<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::LPARAM>>(&self, paddformsproc: ::core::option::Option<LPCQADDFORMSPROC>, lparam: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(paddformsproc), lparam.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe fn AddPages<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::LPARAM>>(&self, paddpagesproc: ::core::option::Option<LPCQADDPAGESPROC>, lparam: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(paddpagesproc), lparam.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IQueryForm { type Vtable = IQueryForm_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8cfcee30_39bd_11d0_b8d1_00a024ab2dbb); } impl ::core::convert::From<IQueryForm> for ::windows::core::IUnknown { fn from(value: IQueryForm) -> Self { value.0 } } impl ::core::convert::From<&IQueryForm> for ::windows::core::IUnknown { fn from(value: &IQueryForm) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IQueryForm { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IQueryForm { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IQueryForm_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_System_Registry")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hkform: super::super::System::Registry::HKEY) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Registry"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, paddformsproc: ::windows::core::RawPtr, lparam: super::super::Foundation::LPARAM) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, paddpagesproc: ::windows::core::RawPtr, lparam: super::super::Foundation::LPARAM) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging")))] usize, ); #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub type LPCQADDFORMSPROC = unsafe extern "system" fn(lparam: super::super::Foundation::LPARAM, pform: *mut CQFORM) -> ::windows::core::HRESULT; #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub type LPCQADDPAGESPROC = unsafe extern "system" fn(lparam: super::super::Foundation::LPARAM, clsidform: *const ::windows::core::GUID, ppage: *mut ::core::mem::ManuallyDrop<CQPAGE>) -> ::windows::core::HRESULT; #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub type LPCQPAGEPROC = unsafe extern "system" fn(ppage: *mut ::core::mem::ManuallyDrop<CQPAGE>, hwnd: super::super::Foundation::HWND, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> ::windows::core::HRESULT; #[cfg(feature = "Win32_Foundation")] pub type LPDSENUMATTRIBUTES = unsafe extern "system" fn(lparam: super::super::Foundation::LPARAM, pszattributename: super::super::Foundation::PWSTR, pszdisplayname: super::super::Foundation::PWSTR, dwflags: u32) -> ::windows::core::HRESULT; pub const LargeInteger: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x927971f5_0939_11d1_8be1_00c04fd8d503); pub const NTDSAPI_BIND_ALLOW_DELEGATION: u32 = 1u32; pub const NTDSAPI_BIND_FIND_BINDING: u32 = 2u32; pub const NTDSAPI_BIND_FORCE_KERBEROS: u32 = 4u32; pub const NTDSCONN_KCC_GC_TOPOLOGY: u32 = 1u32; pub const NTDSCONN_KCC_INTERSITE_GC_TOPOLOGY: u32 = 32u32; pub const NTDSCONN_KCC_INTERSITE_TOPOLOGY: u32 = 64u32; pub const NTDSCONN_KCC_MINIMIZE_HOPS_TOPOLOGY: u32 = 4u32; pub const NTDSCONN_KCC_NO_REASON: u32 = 0u32; pub const NTDSCONN_KCC_OSCILLATING_CONNECTION_TOPOLOGY: u32 = 16u32; pub const NTDSCONN_KCC_REDUNDANT_SERVER_TOPOLOGY: u32 = 512u32; pub const NTDSCONN_KCC_RING_TOPOLOGY: u32 = 2u32; pub const NTDSCONN_KCC_SERVER_FAILOVER_TOPOLOGY: u32 = 128u32; pub const NTDSCONN_KCC_SITE_FAILOVER_TOPOLOGY: u32 = 256u32; pub const NTDSCONN_KCC_STALE_SERVERS_TOPOLOGY: u32 = 8u32; pub const NTDSCONN_OPT_DISABLE_INTERSITE_COMPRESSION: u32 = 16u32; pub const NTDSCONN_OPT_IGNORE_SCHEDULE_MASK: u32 = 2147483648u32; pub const NTDSCONN_OPT_IS_GENERATED: u32 = 1u32; pub const NTDSCONN_OPT_OVERRIDE_NOTIFY_DEFAULT: u32 = 4u32; pub const NTDSCONN_OPT_RODC_TOPOLOGY: u32 = 64u32; pub const NTDSCONN_OPT_TWOWAY_SYNC: u32 = 2u32; pub const NTDSCONN_OPT_USER_OWNED_SCHEDULE: u32 = 32u32; pub const NTDSCONN_OPT_USE_NOTIFY: u32 = 8u32; pub const NTDSDSA_OPT_BLOCK_RPC: u32 = 64u32; pub const NTDSDSA_OPT_DISABLE_INBOUND_REPL: u32 = 2u32; pub const NTDSDSA_OPT_DISABLE_NTDSCONN_XLATE: u32 = 8u32; pub const NTDSDSA_OPT_DISABLE_OUTBOUND_REPL: u32 = 4u32; pub const NTDSDSA_OPT_DISABLE_SPN_REGISTRATION: u32 = 16u32; pub const NTDSDSA_OPT_GENERATE_OWN_TOPO: u32 = 32u32; pub const NTDSDSA_OPT_IS_GC: u32 = 1u32; pub const NTDSSETTINGS_DEFAULT_SERVER_REDUNDANCY: u32 = 2u32; pub const NTDSSETTINGS_OPT_FORCE_KCC_W2K_ELECTION: u32 = 128u32; pub const NTDSSETTINGS_OPT_FORCE_KCC_WHISTLER_BEHAVIOR: u32 = 64u32; pub const NTDSSETTINGS_OPT_IS_AUTO_TOPOLOGY_DISABLED: u32 = 1u32; pub const NTDSSETTINGS_OPT_IS_GROUP_CACHING_ENABLED: u32 = 32u32; pub const NTDSSETTINGS_OPT_IS_INTER_SITE_AUTO_TOPOLOGY_DISABLED: u32 = 16u32; pub const NTDSSETTINGS_OPT_IS_RAND_BH_SELECTION_DISABLED: u32 = 256u32; pub const NTDSSETTINGS_OPT_IS_REDUNDANT_SERVER_TOPOLOGY_ENABLED: u32 = 1024u32; pub const NTDSSETTINGS_OPT_IS_SCHEDULE_HASHING_ENABLED: u32 = 512u32; pub const NTDSSETTINGS_OPT_IS_TOPL_CLEANUP_DISABLED: u32 = 2u32; pub const NTDSSETTINGS_OPT_IS_TOPL_DETECT_STALE_DISABLED: u32 = 8u32; pub const NTDSSETTINGS_OPT_IS_TOPL_MIN_HOPS_DISABLED: u32 = 4u32; pub const NTDSSETTINGS_OPT_W2K3_BRIDGES_REQUIRED: u32 = 4096u32; pub const NTDSSETTINGS_OPT_W2K3_IGNORE_SCHEDULES: u32 = 2048u32; pub const NTDSSITECONN_OPT_DISABLE_COMPRESSION: u32 = 4u32; pub const NTDSSITECONN_OPT_TWOWAY_SYNC: u32 = 2u32; pub const NTDSSITECONN_OPT_USE_NOTIFY: u32 = 1u32; pub const NTDSSITELINK_OPT_DISABLE_COMPRESSION: u32 = 4u32; pub const NTDSSITELINK_OPT_TWOWAY_SYNC: u32 = 2u32; pub const NTDSSITELINK_OPT_USE_NOTIFY: u32 = 1u32; pub const NTDSTRANSPORT_OPT_BRIDGES_REQUIRED: u32 = 2u32; pub const NTDSTRANSPORT_OPT_IGNORE_SCHEDULES: u32 = 1u32; pub const NameTranslate: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x274fae1f_3626_11d1_a3a4_00c04fb950dc); pub const NetAddress: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb0b71247_4080_11d1_a3ac_00c04fb950dc); #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl ::core::clone::Clone for OPENQUERYWINDOW { fn clone(&self) -> Self { unimplemented!() } } #[repr(C)] #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub struct OPENQUERYWINDOW { pub cbStruct: u32, pub dwFlags: u32, pub clsidHandler: ::windows::core::GUID, pub pHandlerParameters: *mut ::core::ffi::c_void, pub clsidDefaultForm: ::windows::core::GUID, pub pPersistQuery: ::core::option::Option<IPersistQuery>, pub Anonymous: OPENQUERYWINDOW_0, } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl OPENQUERYWINDOW {} #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl ::core::default::Default for OPENQUERYWINDOW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl ::core::cmp::PartialEq for OPENQUERYWINDOW { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl ::core::cmp::Eq for OPENQUERYWINDOW {} #[cfg(feature = "Win32_System_Com_StructuredStorage")] unsafe impl ::windows::core::Abi for OPENQUERYWINDOW { type Abi = ::core::mem::ManuallyDrop<Self>; } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl ::core::clone::Clone for OPENQUERYWINDOW_0 { fn clone(&self) -> Self { unimplemented!() } } #[repr(C)] #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub union OPENQUERYWINDOW_0 { pub pFormParameters: *mut ::core::ffi::c_void, pub ppbFormParameters: ::windows::core::RawPtr, } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl OPENQUERYWINDOW_0 {} #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl ::core::default::Default for OPENQUERYWINDOW_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl ::core::cmp::PartialEq for OPENQUERYWINDOW_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl ::core::cmp::Eq for OPENQUERYWINDOW_0 {} #[cfg(feature = "Win32_System_Com_StructuredStorage")] unsafe impl ::windows::core::Abi for OPENQUERYWINDOW_0 { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const OQWF_DEFAULTFORM: u32 = 2u32; pub const OQWF_HIDEMENUS: u32 = 1024u32; pub const OQWF_HIDESEARCHUI: u32 = 2048u32; pub const OQWF_ISSUEONOPEN: u32 = 64u32; pub const OQWF_LOADQUERY: u32 = 8u32; pub const OQWF_OKCANCEL: u32 = 1u32; pub const OQWF_PARAMISPROPERTYBAG: u32 = 2147483648u32; pub const OQWF_REMOVEFORMS: u32 = 32u32; pub const OQWF_REMOVESCOPES: u32 = 16u32; pub const OQWF_SAVEQUERYONOK: u32 = 512u32; pub const OQWF_SHOWOPTIONAL: u32 = 128u32; pub const OQWF_SINGLESELECT: u32 = 4u32; pub const OctetList: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1241400f_4680_11d1_a3b4_00c04fb950dc); pub const Path: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb2538919_4080_11d1_a3ac_00c04fb950dc); pub const Pathname: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x080d0d78_f421_11d0_a36e_00c04fb950dc); pub const PostalAddress: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0a75afcd_4680_11d1_a3b4_00c04fb950dc); #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn PropVariantToAdsType(pvariant: *mut super::super::System::Com::VARIANT, dwnumvariant: u32, ppadsvalues: *mut *mut ADSVALUE, pdwnumvalues: *mut u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn PropVariantToAdsType(pvariant: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, dwnumvariant: u32, ppadsvalues: *mut *mut ADSVALUE, pdwnumvalues: *mut u32) -> ::windows::core::HRESULT; } PropVariantToAdsType(::core::mem::transmute(pvariant), ::core::mem::transmute(dwnumvariant), ::core::mem::transmute(ppadsvalues), ::core::mem::transmute(pdwnumvalues)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const PropertyEntry: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x72d3edc2_a4c4_11d0_8533_00c04fd8d503); pub const PropertyValue: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7b9e38b0_a97c_11d0_8534_00c04fd8d503); pub const QUERYFORM_CHANGESFORMLIST: u64 = 1u64; pub const QUERYFORM_CHANGESOPTFORMLIST: u64 = 2u64; #[inline] pub unsafe fn ReallocADsMem(poldmem: *mut ::core::ffi::c_void, cbold: u32, cbnew: u32) -> *mut ::core::ffi::c_void { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ReallocADsMem(poldmem: *mut ::core::ffi::c_void, cbold: u32, cbnew: u32) -> *mut ::core::ffi::c_void; } ::core::mem::transmute(ReallocADsMem(::core::mem::transmute(poldmem), ::core::mem::transmute(cbold), ::core::mem::transmute(cbnew))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ReallocADsStr<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(ppstr: *mut super::super::Foundation::PWSTR, pstr: Param1) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ReallocADsStr(ppstr: *mut super::super::Foundation::PWSTR, pstr: super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(ReallocADsStr(::core::mem::transmute(ppstr), pstr.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const ReplicaPointer: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf5d1badf_4080_11d1_a3ac_00c04fb950dc); #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct SCHEDULE { pub Size: u32, pub Bandwidth: u32, pub NumberOfSchedules: u32, pub Schedules: [SCHEDULE_HEADER; 1], } impl SCHEDULE {} impl ::core::default::Default for SCHEDULE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for SCHEDULE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("SCHEDULE").field("Size", &self.Size).field("Bandwidth", &self.Bandwidth).field("NumberOfSchedules", &self.NumberOfSchedules).field("Schedules", &self.Schedules).finish() } } impl ::core::cmp::PartialEq for SCHEDULE { fn eq(&self, other: &Self) -> bool { self.Size == other.Size && self.Bandwidth == other.Bandwidth && self.NumberOfSchedules == other.NumberOfSchedules && self.Schedules == other.Schedules } } impl ::core::cmp::Eq for SCHEDULE {} unsafe impl ::windows::core::Abi for SCHEDULE { type Abi = Self; } pub const SCHEDULE_BANDWIDTH: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct SCHEDULE_HEADER { pub Type: u32, pub Offset: u32, } impl SCHEDULE_HEADER {} impl ::core::default::Default for SCHEDULE_HEADER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for SCHEDULE_HEADER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("SCHEDULE_HEADER").field("Type", &self.Type).field("Offset", &self.Offset).finish() } } impl ::core::cmp::PartialEq for SCHEDULE_HEADER { fn eq(&self, other: &Self) -> bool { self.Type == other.Type && self.Offset == other.Offset } } impl ::core::cmp::Eq for SCHEDULE_HEADER {} unsafe impl ::windows::core::Abi for SCHEDULE_HEADER { type Abi = Self; } pub const SCHEDULE_INTERVAL: u32 = 0u32; pub const SCHEDULE_PRIORITY: u32 = 2u32; pub const STATUS_SEVERITY_ERROR: u32 = 3u32; pub const STATUS_SEVERITY_INFORMATIONAL: u32 = 1u32; pub const STATUS_SEVERITY_SUCCESS: u32 = 0u32; pub const STATUS_SEVERITY_WARNING: u32 = 2u32; pub const SecurityDescriptor: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb958f73c_9bdd_11d0_852c_00c04fd8d503); #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] pub unsafe fn SecurityDescriptorToBinarySD<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>( vvarsecdes: Param0, ppsecuritydescriptor: *mut *mut super::super::Security::SECURITY_DESCRIPTOR, pdwsdlength: *mut u32, pszservername: Param3, username: Param4, password: Param5, dwflags: u32, ) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn SecurityDescriptorToBinarySD(vvarsecdes: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, ppsecuritydescriptor: *mut *mut super::super::Security::SECURITY_DESCRIPTOR, pdwsdlength: *mut u32, pszservername: super::super::Foundation::PWSTR, username: super::super::Foundation::PWSTR, password: super::super::Foundation::PWSTR, dwflags: u32) -> ::windows::core::HRESULT; } SecurityDescriptorToBinarySD(vvarsecdes.into_param().abi(), ::core::mem::transmute(ppsecuritydescriptor), ::core::mem::transmute(pdwsdlength), pszservername.into_param().abi(), username.into_param().abi(), password.into_param().abi(), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const Timestamp: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb2bed2eb_4080_11d1_a3ac_00c04fb950dc); pub const TypedName: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb33143cb_4080_11d1_a3ac_00c04fb950dc); pub const WM_ADSPROP_NOTIFY_APPLY: u32 = 2128u32; pub const WM_ADSPROP_NOTIFY_CHANGE: u32 = 2127u32; pub const WM_ADSPROP_NOTIFY_ERROR: u32 = 2134u32; pub const WM_ADSPROP_NOTIFY_EXIT: u32 = 2131u32; pub const WM_ADSPROP_NOTIFY_FOREGROUND: u32 = 2130u32; pub const WM_ADSPROP_NOTIFY_PAGEHWND: u32 = 2126u32; pub const WM_ADSPROP_NOTIFY_PAGEINIT: u32 = 2125u32; pub const WM_ADSPROP_NOTIFY_SETFOCUS: u32 = 2129u32; pub const WinNTSystemInfo: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x66182ec4_afd1_11d2_9cb9_0000f87a369e); #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ads_search_column { pub pszAttrName: super::super::Foundation::PWSTR, pub dwADsType: ADSTYPEENUM, pub pADsValues: *mut ADSVALUE, pub dwNumValues: u32, pub hReserved: super::super::Foundation::HANDLE, } #[cfg(feature = "Win32_Foundation")] impl ads_search_column {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ads_search_column { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ads_search_column { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ads_search_column").field("pszAttrName", &self.pszAttrName).field("dwADsType", &self.dwADsType).field("pADsValues", &self.pADsValues).field("dwNumValues", &self.dwNumValues).field("hReserved", &self.hReserved).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ads_search_column { fn eq(&self, other: &Self) -> bool { self.pszAttrName == other.pszAttrName && self.dwADsType == other.dwADsType && self.pADsValues == other.pADsValues && self.dwNumValues == other.dwNumValues && self.hReserved == other.hReserved } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ads_search_column {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ads_search_column { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ads_searchpref_info { pub dwSearchPref: ADS_SEARCHPREF_ENUM, pub vValue: ADSVALUE, pub dwStatus: ADS_STATUSENUM, } #[cfg(feature = "Win32_Foundation")] impl ads_searchpref_info {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ads_searchpref_info { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ads_searchpref_info { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ads_searchpref_info {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ads_searchpref_info { type Abi = Self; }
//! # Serial //! //! Asynchronous serial communication using the interal USART peripherals //! //! The serial modules implement the [`Read`] and [`Write`] traits. //! //! [`Read`]: embedded_hal::serial::Read //! [`Write`]: embedded_hal::serial::Write use core::{convert::Infallible, ops::Deref}; use crate::{ gpio::{gpioa, gpiob, gpioc, AF7}, hal::{blocking, serial}, pac::{self, rcc::cfgr3::USART1SW_A, usart1::RegisterBlock, USART1, USART2, USART3}, rcc::{Clocks, APB1, APB2}, time::rate::*, }; #[allow(unused_imports)] use crate::pac::RCC; use cfg_if::cfg_if; use crate::dma; use cortex_m::interrupt; /// Interrupt event pub enum Event { /// New data has been received Rxne, /// New data can be sent Txe, /// Transmission complete Tc, /// Idle line state detected Idle, } /// Serial error #[derive(Debug)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] #[non_exhaustive] pub enum Error { /// Framing error Framing, /// Noise error Noise, /// RX buffer overrun Overrun, /// Parity check error Parity, } /// TX pin pub trait TxPin<Usart>: crate::private::Sealed {} /// RX pin pub trait RxPin<Usart>: crate::private::Sealed {} impl<Otype> TxPin<USART1> for gpioa::PA9<AF7<Otype>> {} impl<Otype> TxPin<USART1> for gpiob::PB6<AF7<Otype>> {} impl<Otype> TxPin<USART1> for gpioc::PC4<AF7<Otype>> {} impl<Otype> RxPin<USART1> for gpioa::PA10<AF7<Otype>> {} impl<Otype> RxPin<USART1> for gpiob::PB7<AF7<Otype>> {} impl<Otype> RxPin<USART1> for gpioc::PC5<AF7<Otype>> {} impl<Otype> TxPin<USART2> for gpioa::PA2<AF7<Otype>> {} impl<Otype> TxPin<USART2> for gpiob::PB3<AF7<Otype>> {} impl<Otype> RxPin<USART2> for gpioa::PA3<AF7<Otype>> {} impl<Otype> RxPin<USART2> for gpiob::PB4<AF7<Otype>> {} impl<Otype> TxPin<USART3> for gpiob::PB10<AF7<Otype>> {} impl<Otype> TxPin<USART3> for gpioc::PC10<AF7<Otype>> {} impl<Otype> RxPin<USART3> for gpioc::PC11<AF7<Otype>> {} cfg_if! { if #[cfg(any(feature = "gpio-f303", feature = "gpio-f303e", feature = "gpio-f373"))] { use crate::gpio::{gpiod, gpioe}; impl<Otype> TxPin<USART1> for gpioe::PE0<AF7<Otype>> {} impl<Otype> RxPin<USART1> for gpioe::PE1<AF7<Otype>> {} impl<Otype> TxPin<USART2> for gpiod::PD5<AF7<Otype>> {} impl<Otype> RxPin<USART2> for gpiod::PD6<AF7<Otype>> {} impl<Otype> TxPin<USART3> for gpiod::PD8<AF7<Otype>> {} impl<Otype> RxPin<USART3> for gpiod::PD9<AF7<Otype>> {} impl<Otype> RxPin<USART3> for gpioe::PE15<AF7<Otype>> {} } } cfg_if! { if #[cfg(not(feature = "gpio-f373"))] { impl<Otype> TxPin<USART2> for gpioa::PA14<AF7<Otype>> {} impl<Otype> RxPin<USART2> for gpioa::PA15<AF7<Otype>> {} impl<Otype> RxPin<USART3> for gpiob::PB11<AF7<Otype>> {} } } cfg_if! { if #[cfg(any(feature = "gpio-f303", feature = "gpio-f303e",))] { use crate::pac::{UART4, UART5}; use crate::gpio::AF5; impl<Otype> TxPin<UART4> for gpioc::PC10<AF5<Otype>> {} impl<Otype> RxPin<UART4> for gpioc::PC11<AF5<Otype>> {} impl<Otype> TxPin<UART5> for gpioc::PC12<AF5<Otype>> {} impl<Otype> RxPin<UART5> for gpiod::PD2<AF5<Otype>> {} } } /// Serial abstraction pub struct Serial<Usart, Pins> { usart: Usart, pins: Pins, } mod split { use super::Instance; /// Serial receiver pub struct Rx<Usart> { usart: Usart, } /// Serial transmitter pub struct Tx<Usart> { usart: Usart, } impl<Usart> Tx<Usart> where Usart: Instance, { pub(crate) fn new(usart: Usart) -> Self { Tx { usart } } /// Get a reference to internal usart peripheral /// /// # Safety /// /// This is unsafe, because the creation of this struct /// is only possible by splitting the the USART peripheral /// into Tx and Rx, which are internally both pointing /// to the same peripheral. /// /// Therefor, if getting a mutuable reference to the peripheral /// or changing any of it's configuration, the exclusivity /// is no longer guaranteed by the type system. /// /// Ensure that the Tx and Rx implemtation only do things with /// the peripheral, which do not effect the other. pub(crate) unsafe fn usart(&self) -> &Usart { &self.usart } } impl<Usart> Rx<Usart> where Usart: Instance, { pub(crate) fn new(usart: Usart) -> Self { Rx { usart } } /// Get a reference to internal usart peripheral /// /// # Safety /// /// This is unsafe, because the creation of this struct /// is only possible by splitting the the USART peripheral /// into Tx and Rx, which are internally both pointing /// to the same peripheral. /// /// Therefor, if getting a mutuable reference to the peripheral /// or changing any of it's configuration, the exclusivity /// is no longer guaranteed by the type system. /// /// Ensure that the Tx and Rx implemtation only do things with /// the peripheral, which do not effect the other. pub(crate) unsafe fn usart(&self) -> &Usart { &self.usart } } } pub use split::{Rx, Tx}; impl<Usart, Tx, Rx> Serial<Usart, (Tx, Rx)> where Usart: Instance, { /// Configures a USART peripheral to provide serial communication pub fn new( usart: Usart, pins: (Tx, Rx), baud_rate: Baud, clocks: Clocks, apb: &mut <Usart as Instance>::APB, ) -> Self where Usart: Instance, Tx: TxPin<Usart>, Rx: RxPin<Usart>, { Usart::enable_clock(apb); let brr = Usart::clock(&clocks).integer() / baud_rate.integer(); crate::assert!(brr >= 16, "impossible baud rate"); usart.brr.write(|w| w.brr().bits(brr as u16)); usart.cr1.modify(|_, w| { w.ue().enabled(); // enable USART w.re().enabled(); // enable receiver w.te().enabled() // enable transmitter }); Self { usart, pins } } /// Starts listening for an interrupt event pub fn listen(&mut self, event: Event) { match event { Event::Rxne => self.usart.cr1.modify(|_, w| w.rxneie().enabled()), Event::Txe => self.usart.cr1.modify(|_, w| w.txeie().enabled()), Event::Tc => self.usart.cr1.modify(|_, w| w.tcie().enabled()), Event::Idle => self.usart.cr1.modify(|_, w| w.idleie().enabled()), } } /// Stops listening for an interrupt event pub fn unlisten(&mut self, event: Event) { match event { Event::Rxne => self.usart.cr1.modify(|_, w| w.rxneie().disabled()), Event::Txe => self.usart.cr1.modify(|_, w| w.txeie().disabled()), Event::Tc => self.usart.cr1.modify(|_, w| w.tcie().disabled()), Event::Idle => self.usart.cr1.modify(|_, w| w.idleie().disabled()), } } /// Return true if the tx register is empty (and can accept data) pub fn is_txe(&self) -> bool { self.usart.isr.read().txe().bit_is_set() } /// Return true if the rx register is not empty (and can be read) pub fn is_rxne(&self) -> bool { self.usart.isr.read().rxne().bit_is_set() } /// Return true if the transmission is complete pub fn is_tc(&self) -> bool { self.usart.isr.read().tc().bit_is_set() } /// Return true if the line idle status is set pub fn is_idle(&self) -> bool { self.usart.isr.read().tc().bit_is_set() } /// Releases the USART peripheral and associated pins pub fn free(self) -> (Usart, (Tx, Rx)) { self.usart .cr1 .modify(|_, w| w.ue().disabled().re().disabled().te().disabled()); (self.usart, self.pins) } } // TODO: Check if u16 for WORD is feasiable / possible impl<Usart, Tx, Rx> serial::Read<u8> for Serial<Usart, (Tx, Rx)> where Usart: Instance, { type Error = Error; fn read(&mut self) -> nb::Result<u8, Error> { let isr = self.usart.isr.read(); Err(if isr.pe().bit_is_set() { self.usart.icr.write(|w| w.pecf().clear()); nb::Error::Other(Error::Parity) } else if isr.fe().bit_is_set() { self.usart.icr.write(|w| w.fecf().clear()); nb::Error::Other(Error::Framing) } else if isr.nf().bit_is_set() { self.usart.icr.write(|w| w.ncf().clear()); nb::Error::Other(Error::Noise) } else if isr.ore().bit_is_set() { self.usart.icr.write(|w| w.orecf().clear()); nb::Error::Other(Error::Overrun) } else if isr.rxne().bit_is_set() { return Ok(self.usart.rdr.read().bits() as u8); } else { nb::Error::WouldBlock }) } } impl<Usart> serial::Read<u8> for Rx<Usart> where Usart: Instance, { type Error = Error; fn read(&mut self) -> nb::Result<u8, Error> { // NOTE(unsafe) atomic read with no side effects let isr = unsafe { self.usart().isr.read() }; // NOTE(unsafe, write) write accessor for atomic writes with no side effects let icr = unsafe { &self.usart().icr }; Err(if isr.pe().bit_is_set() { icr.write(|w| w.pecf().clear()); nb::Error::Other(Error::Parity) } else if isr.fe().bit_is_set() { icr.write(|w| w.fecf().clear()); nb::Error::Other(Error::Framing) } else if isr.nf().bit_is_set() { icr.write(|w| w.ncf().clear()); nb::Error::Other(Error::Noise) } else if isr.ore().bit_is_set() { icr.write(|w| w.orecf().clear()); nb::Error::Other(Error::Overrun) } else if isr.rxne().bit_is_set() { // NOTE(unsafe) atomic read with no side effects return Ok(unsafe { self.usart().rdr.read().bits() as u8 }); } else { nb::Error::WouldBlock }) } } impl<Usart, Tx, Rx> serial::Write<u8> for Serial<Usart, (Tx, Rx)> where Usart: Instance, { // NOTE(Infallible) See section "29.7 USART interrupts"; the only possible errors during // transmission are: clear to send (which is disabled in this case) errors and // framing errors (which only occur in SmartCard mode); neither of these apply to // our hardware configuration type Error = Infallible; fn flush(&mut self) -> nb::Result<(), Infallible> { if self.usart.isr.read().tc().bit_is_set() { Ok(()) } else { Err(nb::Error::WouldBlock) } } fn write(&mut self, byte: u8) -> nb::Result<(), Infallible> { if self.usart.isr.read().txe().bit_is_set() { self.usart.tdr.write(|w| w.tdr().bits(u16::from(byte))); Ok(()) } else { Err(nb::Error::WouldBlock) } } } impl<USART, TX, RX> blocking::serial::write::Default<u8> for Serial<USART, (TX, RX)> where USART: Instance { } impl<Usart> serial::Write<u8> for Tx<Usart> where Usart: Instance, { // NOTE(Infallible) See section "29.7 USART interrupts"; the only possible errors during // transmission are: clear to send (which is disabled in this case) errors and // framing errors (which only occur in SmartCard mode); neither of these apply to // our hardware configuration type Error = Infallible; fn flush(&mut self) -> nb::Result<(), Infallible> { let isr = unsafe { self.usart().isr.read() }; if isr.tc().bit_is_set() { Ok(()) } else { Err(nb::Error::WouldBlock) } } fn write(&mut self, byte: u8) -> nb::Result<(), Infallible> { // NOTE(unsafe) atomic read with no side effects let isr = unsafe { self.usart().isr.read() }; if isr.txe().bit_is_set() { // NOTE(unsafe) atomic write to stateless register unsafe { self.usart().tdr.write(|w| w.tdr().bits(u16::from(byte))) }; Ok(()) } else { Err(nb::Error::WouldBlock) } } } impl<Usart> Rx<Usart> where Usart: Instance + Dma, { /// Fill the buffer with received data using DMA. pub fn read_exact<B, C>(self, buffer: B, mut channel: C) -> dma::Transfer<B, C, Self> where Self: dma::OnChannel<C>, B: dma::WriteBuffer<Word = u8> + 'static, C: dma::Channel, { // NOTE(unsafe) usage of a valid peripheral address unsafe { channel.set_peripheral_address( &self.usart().rdr as *const _ as u32, dma::Increment::Disable, ) }; dma::Transfer::start_write(buffer, channel, self) } } impl<Usart> blocking::serial::write::Default<u8> for Tx<Usart> where Usart: Instance {} impl<Usart> Tx<Usart> where Usart: Instance + Dma, { /// Transmit all data in the buffer using DMA. pub fn write_all<B, C>(self, buffer: B, mut channel: C) -> dma::Transfer<B, C, Self> where Self: dma::OnChannel<C>, B: dma::ReadBuffer<Word = u8> + 'static, C: dma::Channel, { // NOTE(unsafe) usage of a valid peripheral address unsafe { channel.set_peripheral_address( &self.usart().tdr as *const _ as u32, dma::Increment::Disable, ) }; dma::Transfer::start_read(buffer, channel, self) } } impl<Usart> dma::Target for Rx<Usart> where Usart: Instance + Dma, { fn enable_dma(&mut self) { // NOTE(unsafe) critical section prevents races interrupt::free(|_| unsafe { self.usart().cr3.modify(|_, w| w.dmar().enabled()); }); } fn disable_dma(&mut self) { // NOTE(unsafe) critical section prevents races interrupt::free(|_| unsafe { self.usart().cr3.modify(|_, w| w.dmar().disabled()); }); } } impl<Usart> dma::Target for Tx<Usart> where Usart: Instance + Dma, { fn enable_dma(&mut self) { // NOTE(unsafe) critical section prevents races interrupt::free(|_| unsafe { self.usart().cr3.modify(|_, w| w.dmat().enabled()); }); } fn disable_dma(&mut self) { // NOTE(unsafe) critical section prevents races interrupt::free(|_| unsafe { self.usart().cr3.modify(|_, w| w.dmat().disabled()); }); } } impl<Usart, Tx, Rx> Serial<Usart, (Tx, Rx)> where Usart: Instance + Dma, { /// Fill the buffer with received data using DMA. pub fn read_exact<B, C>(self, buffer: B, mut channel: C) -> dma::Transfer<B, C, Self> where Self: dma::OnChannel<C>, B: dma::WriteBuffer<Word = u8> + 'static, C: dma::Channel, { // NOTE(unsafe) usage of a valid peripheral address unsafe { channel .set_peripheral_address(&self.usart.rdr as *const _ as u32, dma::Increment::Disable) }; dma::Transfer::start_write(buffer, channel, self) } /// Transmit all data in the buffer using DMA. pub fn write_all<B, C>(self, buffer: B, mut channel: C) -> dma::Transfer<B, C, Self> where Self: dma::OnChannel<C>, B: dma::ReadBuffer<Word = u8> + 'static, C: dma::Channel, { // NOTE(unsafe) usage of a valid peripheral address unsafe { channel .set_peripheral_address(&self.usart.tdr as *const _ as u32, dma::Increment::Disable) }; dma::Transfer::start_read(buffer, channel, self) } } impl<Usart, Tx, Rx> dma::Target for Serial<Usart, (Tx, Rx)> where Usart: Instance + Dma, { fn enable_dma(&mut self) { self.usart .cr3 .modify(|_, w| w.dmar().enabled().dmat().enabled()) } fn disable_dma(&mut self) { self.usart .cr3 .modify(|_, w| w.dmar().disabled().dmat().disabled()) } } /// Marker trait for DMA capable UART implementations. pub trait Dma: crate::private::Sealed {} impl Dma for USART1 {} impl Dma for USART2 {} impl Dma for USART3 {} /// UART instance pub trait Instance: Deref<Target = RegisterBlock> + crate::private::Sealed { /// Peripheral bus instance which is responsible for the peripheral type APB; #[doc(hidden)] fn enable_clock(apb1: &mut Self::APB); #[doc(hidden)] fn clock(clocks: &Clocks) -> Hertz; } macro_rules! usart { ( $( $USARTX:ident: ( $usartXen:ident, $APB:ident, $pclkX:ident, $usartXrst:ident, $usartXsw:ident, $usartXclock:ident ), )+ ) => { $( impl crate::private::Sealed for $USARTX {} impl Instance for $USARTX { type APB = $APB; fn enable_clock(apb: &mut Self::APB) { apb.enr().modify(|_, w| w.$usartXen().enabled()); apb.rstr().modify(|_, w| w.$usartXrst().reset()); apb.rstr().modify(|_, w| w.$usartXrst().clear_bit()); } fn clock(clocks: &Clocks) -> Hertz { // Use the function created via another macro outside of this one, // because the implementation is dependend on the type $USARTX. // But macros can not differentiate between types. $usartXclock(clocks) } } impl<Tx, Rx> Serial<$USARTX, (Tx, Rx)> { /// Splits the `Serial` abstraction into a transmitter and a receiver half pub fn split(self) -> (split::Tx<$USARTX>, split::Rx<$USARTX>) { // NOTE(unsafe): This essentially duplicates the USART peripheral // // As RX and TX both do have direct access to the peripheral, // they must guarantee to only do atomic operations on the peripheral // registers to avoid data races. // // Tx and Rx won't access the same registers anyways, // as they have independet responbilities, which are NOT represented // in the type system. let (tx, rx) = unsafe { ( pac::Peripherals::steal().$USARTX, pac::Peripherals::steal().$USARTX, ) }; (split::Tx::new(tx), split::Rx::new(rx)) } } )+ }; ([ $(($X:literal, $APB:literal)),+ ]) => { paste::paste! { usart!( $( [<USART $X>]: ( [<usart $X en>], [<APB $APB>], [<pclk $APB>], [<usart $X rst>], [<usart $X sw>], [<usart $X clock>] ), )+ ); } }; } /// Generates a clock function for UART Peripherals, where /// the only clock source can be the peripheral clock #[allow(unused_macros)] macro_rules! usart_static_clock { ($($usartXclock:ident, $pclkX:ident),+) => { $( /// Return the currently set source frequency the UART peripheral /// depending on the clock source. fn $usartXclock(clocks: &Clocks) -> Hertz { clocks.$pclkX() } )+ }; ([ $(($X:literal, $APB:literal)),+ ]) => { paste::paste! { usart_static_clock!( $([<usart $X clock>], [<pclk $APB>]),+ ); } }; } /// Generates a clock function for UART Peripherals, where /// the clock source can vary. macro_rules! usart_var_clock { ($($usartXclock:ident, $usartXsw:ident, $pclkX:ident),+) => { $( /// Return the currently set source frequency the UART peripheral /// depending on the clock source. fn $usartXclock(clocks: &Clocks) -> Hertz { // NOTE(unsafe): atomic read with no side effects match unsafe {(*RCC::ptr()).cfgr3.read().$usartXsw().variant()} { USART1SW_A::PCLK => clocks.$pclkX(), USART1SW_A::HSI => crate::rcc::HSI, USART1SW_A::SYSCLK => clocks.sysclk(), USART1SW_A::LSE => crate::rcc::LSE, } } )+ }; ([ $(($X:literal, $APB:literal)),+ ]) => { paste::paste! { usart_var_clock!( $([<usart $X clock>], [<usart $X sw>], [<pclk $APB>]),+ ); } }; } cfg_if::cfg_if! { if #[cfg(any(feature = "svd-f301", feature = "svd-f3x4"))] { usart_var_clock!([(1,2)]); // These are uart peripherals, where the only clock source // is the PCLK (peripheral clock). usart_static_clock!([(2,1), (3,1)]); } else { usart_var_clock!([(1, 2), (2, 1), (3, 1)]); } } usart!([(1, 2), (2, 1), (3, 1)]); cfg_if::cfg_if! { // See table 29.4 RM0316 if #[cfg(any(feature = "gpio-f303", feature = "gpio-f303e"))] { macro_rules! uart { ([ $(($X:literal, $APB:literal)),+ ]) => { paste::paste! { usart!( $( [<UART $X>]: ( [<uart $X en>], [<APB $APB>], [<pclk $APB>], [<uart $X rst>], [<uart $X sw>], [<usart $X clock>] ), )+ ); } }; } macro_rules! uart_var_clock { ([ $(($X:literal, $APB:literal)),+ ]) => { paste::paste! { usart_var_clock!( $([<usart $X clock>], [<uart $X sw>], [<pclk $APB>]),+ ); } }; } uart_var_clock!([(4,1), (5,1)]); uart!([(4,1), (5,1)]); impl Dma for UART4 {} } }
use crate::event::{Event, LogEvent, Metric}; use rlua::prelude::*; impl<'a> ToLua<'a> for Event { fn to_lua(self, ctx: LuaContext<'a>) -> LuaResult<LuaValue> { let table = ctx.create_table()?; match self { Event::Log(log) => table.set("log", log.to_lua(ctx)?)?, Event::Metric(metric) => table.set("metric", metric.to_lua(ctx)?)?, } Ok(LuaValue::Table(table)) } } impl<'a> FromLua<'a> for Event { fn from_lua(value: LuaValue<'a>, ctx: LuaContext<'a>) -> LuaResult<Self> { let table = match &value { LuaValue::Table(t) => t, _ => { return Err(LuaError::FromLuaConversionError { from: value.type_name(), to: "Event", message: Some("Event should be a Lua table".to_string()), }) } }; match (table.get("log")?, table.get("metric")?) { (LuaValue::Table(log), LuaValue::Nil) => { Ok(Event::Log(LogEvent::from_lua(LuaValue::Table(log), ctx)?)) } (LuaValue::Nil, LuaValue::Table(metric)) => Ok(Event::Metric(Metric::from_lua( LuaValue::Table(metric), ctx, )?)), _ => Err(LuaError::FromLuaConversionError { from: value.type_name(), to: "Event", message: Some( "Event should contain either \"log\" or \"metric\" key at the top level" .to_string(), ), }), } } } #[cfg(test)] mod test { use super::*; use crate::event::{ metric::{MetricKind, MetricValue}, Metric, Value, }; fn assert_event(event: Event, assertions: Vec<&'static str>) { Lua::new().context(|ctx| { ctx.globals().set("event", event).unwrap(); for assertion in assertions { assert!( ctx.load(assertion).eval::<bool>().expect(assertion), assertion ); } }); } #[test] fn to_lua_log() { let mut event = Event::new_empty_log(); event.as_mut_log().insert("field", "value"); let assertions = vec![ "type(event) == 'table'", "event.metric == nil", "type(event.log) == 'table'", "event.log.field == 'value'", ]; assert_event(event, assertions); } #[test] fn to_lua_metric() { let event = Event::Metric(Metric { name: "example counter".into(), timestamp: None, tags: None, kind: MetricKind::Absolute, value: MetricValue::Counter { value: 0.57721566 }, }); let assertions = vec![ "type(event) == 'table'", "event.log == nil", "type(event.metric) == 'table'", "event.metric.name == 'example counter'", "event.metric.counter.value == 0.57721566", ]; assert_event(event, assertions); } #[test] fn from_lua_log() { let lua_event = r#" { log = { field = "example", nested = { field = "another example" } } }"#; Lua::new().context(|ctx| { let event = ctx.load(lua_event).eval::<Event>().unwrap(); let log = event.as_log(); assert_eq!(log[&"field".into()], Value::Bytes("example".into())); assert_eq!( log[&"nested.field".into()], Value::Bytes("another example".into()) ); }); } #[test] fn from_lua_metric() { let lua_event = r#" { metric = { name = "example counter", counter = { value = 0.57721566 } } }"#; let expected = Event::Metric(Metric { name: "example counter".into(), timestamp: None, tags: None, kind: MetricKind::Absolute, value: MetricValue::Counter { value: 0.57721566 }, }); Lua::new().context(|ctx| { let event = ctx.load(lua_event).eval::<Event>().unwrap(); assert_eq!(event, expected); }); } #[test] #[should_panic] fn from_lua_missing_log_and_metric() { let lua_event = r#"{ some_field: {} }"#; Lua::new().context(|ctx| ctx.load(lua_event).eval::<Event>().unwrap()); } #[test] #[should_panic] fn from_lua_both_log_and_metric() { let lua_event = r#"{ log = { field = "example", nested = { field = "another example" } }, metric = { name = "example counter", counter = { value = 0.57721566 } } }"#; Lua::new().context(|ctx| ctx.load(lua_event).eval::<Event>().unwrap()); } }
mod database; use crate::database::{Database, DatabaseConfig}; use serde_json::json; fn main() { let mut db = Database::new(DatabaseConfig { path: "db.json".to_string(), }); let success = db.insert_one(json!({ "name": "Billy", "age": 27, })); match success { Err(e) => println!("{}", e), Ok(()) => println!("Successfully added document"), } let success = db.insert_many(json!([{ "name": "Tanner", "age": 26, },{ "name": "Carisa", "age": 26, }])); match success { Err(e) => println!("{}", e), Ok(()) => println!("Successfully added documents"), } let query = json!({ "name": "Billy", }); match db.find_one(query) { None => println!("No results"), Some(result) => println!("Results: {}", result), } let query = json!({ "age": 27, }); match db.find_many(query) { None => println!("No results"), Some(results) => println!("Results: {:?}", results), } let query = json!({ "name": "Tanner", }); let updates = json!({ "age": 27 }); match db.update_one(query, updates) { Err(e) => println!("{}", e), Ok(()) => println!("Successfully updated document"), } let query = json!({ "age": 27, }); let updates = json!({ "age": 28 }); match db.update_many(query, updates) { Err(e) => println!("{}", e), Ok(()) => println!("Successfully updated documents"), } let query = json!({ "age": 28, }); match db.delete_many(query) { Err(e) => println!("{}", e), Ok(()) => println!("Successfully deleted documents"), } let query = json!({ "name": "Carisa", }); match db.delete_one(query) { Err(e) => println!("{}", e), Ok(()) => println!("Successfully deleted document"), } }
use std::io::{Write, BufRead, BufReader}; use std::fs::{self, File}; use std::collections::HashMap; use std::process::Command; use hex_database::{Track, Reader, Writer, Playlist}; pub fn modify_tracks(write: &Writer, tracks: Vec<Track>) { { let mut file = File::create("/tmp/cli_modify").unwrap(); for track in tracks.clone() { let buf = format!("{} | {} | {} | {} | {}\n", track.title.unwrap_or("None".into()), track.album.unwrap_or("None".into()), track.interpret.unwrap_or("None".into()), track.people.unwrap_or("None".into()), track.composer.unwrap_or("None".into()) ); file.write(&buf.as_bytes()).unwrap(); } } // open vim and edit all tracks Command::new("vim") .arg("-c").arg(":set wrap!") .arg("-c").arg(":%!column -t -o \"|\" -s \"|\"") .arg("/tmp/cli_modify") .status().expect("Could not open file!"); // apply changes to the database { let file = File::open("/tmp/cli_modify").unwrap(); for (line, track) in BufReader::new(file).lines().zip(tracks.into_iter()) { let params: Vec<String> = line.unwrap().split("|").map(|x| x.trim().into()).collect(); if params.len() != 5 { continue; } // skip if there is no change if track.title.unwrap_or("None".into()) == params[0] && track.album.unwrap_or("None".into()) == params[1] && track.interpret.unwrap_or("None".into()) == params[2] && track.people.unwrap_or("None".into()) == params[3] && track.composer.unwrap_or("None".into()) == params[4] { continue; } write.update_track( track.key, if params[0] == "None" { None } else { Some(&params[0]) }, if params[1] == "None" { None } else { Some(&params[1]) }, if params[2] == "None" { None } else { Some(&params[2]) }, if params[3] == "None" { None } else { Some(&params[3]) }, if params[4] == "None" { None } else { Some(&params[4]) }, ).unwrap(); } } fs::remove_file("/tmp/cli_modify").unwrap(); } pub fn modify_playlist(write: &Writer, mut playlist: Playlist, tracks: Vec<Track>) { let mut map = HashMap::new(); { let mut file = File::create("/tmp/cli_modify").unwrap(); file.write(&format!("Playlist title: {}\n", playlist.title).as_bytes()).unwrap(); file.write(&format!("Playlist description: {}\n", playlist.desc.unwrap_or("None".into())).as_bytes()).unwrap(); file.write("Tracks:\n".as_bytes()).unwrap(); for track in tracks.clone() { let line = format!(" => {} - {} ({})", track.key.to_string(), track.title.unwrap_or("".into()), track.album.unwrap_or("".into())); file.write(&format!("{}\n", line).as_bytes()).unwrap(); map.insert(line, track.key.clone()); } } // open vim and edit all tracks Command::new("vim") .arg("-c").arg(":set wrap!") .arg("/tmp/cli_modify") .status().expect("Could not open file!"); // apply changes to the database { let file = File::open("/tmp/cli_modify").unwrap(); let mut reader = BufReader::new(file).lines(); if let Some(Ok(title)) = reader.next() { let mut splitted = title.split(":"); if splitted.next() != Some("Playlist title") { println!("Playlist title not found!"); return; } playlist.title = title.split(":").skip(1).next().unwrap_or("New Playlist").trim().to_string(); } else { println!("Playlist file too short!"); return; } if let Some(Ok(desc)) = reader.next() { let mut splitted = desc.split(":"); if splitted.next() != Some("Playlist description") { println!("Playlist description not found!"); return; } playlist.desc = splitted.next().map(|x| x.trim().to_string()); } else { println!("Playlist file too short!"); return; } if let Some(Ok(title)) = reader.next() { if title != "Tracks:" { println!("Track header not found!"); return; } playlist.tracks.clear(); while let Some(Ok(track)) = reader.next() { if let Some(key) = map.get(&track) { playlist.tracks.push(*key); } } if let Err(err) = write.update_playlist(playlist.key, Some(playlist.title), playlist.desc, Some(playlist.tracks)) { eprintln!("Could not update playlist = {:?}", err); } } } fs::remove_file("/tmp/cli_modify").unwrap(); } pub fn modify_tokens(write: &Writer, read: &Reader) { let tokens = read.get_tokens().unwrap(); { let mut file = File::create("/tmp/cli_modify").unwrap(); for (token, playlist) in tokens.clone() { let buf = format!("{} | {} | {}\n", token.token, token.last_use, playlist.map(|x| x.title).unwrap_or("None".into())); file.write(&buf.as_bytes()).unwrap(); } } // open vim and edit all tracks Command::new("vim") .arg("-c").arg(":set wrap!") .arg("-c").arg(":%!column -t -o \"|\" -s \"|\"") .arg("/tmp/cli_modify") .status().expect("Could not open file!"); // apply changes to the database { let file = File::open("/tmp/cli_modify").unwrap(); for (line, (mut token, playlist)) in BufReader::new(file).lines().zip(tokens.into_iter()) { let params: Vec<String> = line.unwrap().split("|").map(|x| x.trim().into()).collect(); if params.len() != 3 { continue; } if params[2] == "None" { token.key = None; write.update_token2(token); } else if playlist.map(|x| x.title).unwrap_or("None".into()) != params[2] { if let Ok((new_playlist,_)) = read.get_playlist_by_title(&params[2]) { token.key = Some(new_playlist.key); write.update_token2(token); } else { println!("Could not find playlist {}!", params[2]); } } } /*for (line, track) in BufReader::new(file).lines().zip(tracks.into_iter()) { let params: Vec<String> = line.unwrap().split("|").map(|x| x.trim().into()).collect(); if params.len() != 5 { continue; } // skip if there is no change if track.title.unwrap_or("None".into()) == params[0] && track.album.unwrap_or("None".into()) == params[1] && track.interpret.unwrap_or("None".into()) == params[2] && track.people.unwrap_or("None".into()) == params[3] && track.composer.unwrap_or("None".into()) == params[4] { continue; } write.update_track( track.key, if params[0] == "None" { None } else { Some(&params[0]) }, if params[1] == "None" { None } else { Some(&params[1]) }, if params[2] == "None" { None } else { Some(&params[2]) }, if params[3] == "None" { None } else { Some(&params[3]) }, if params[4] == "None" { None } else { Some(&params[4]) }, ).unwrap(); }*/ } fs::remove_file("/tmp/cli_modify").unwrap(); }
use failure::{format_err, Fallible, ResultExt}; use std::path::Path; use std::process::ExitStatus; use super::{cmd, util}; pub fn run(files: Vec<&str>, stdin: &str) -> Fallible<ExitStatus> { let work_dir = util::dirname(files[0])?; let bin_file = "main_oc"; let compile_cmd = format!( "clang `gnustep-config --objc-flags` `gnustep-config --objc-libs` \ -lobjc -ldispatch -lgnustep-base -fobjc-arc -o {} \"{}\"", bin_file, files[0] ); let status: ExitStatus = cmd::run_bash(work_dir, &compile_cmd)?; if !status.success() { return Ok(status); } let bin_path_buf = Path::new(work_dir).join(bin_file); let bin_path = bin_path_buf .to_str() .ok_or(format_err!("invalid bin_path"))?; cmd::run_bash_stdin(work_dir, bin_path, stdin) }
use std::cell::RefCell; use std::collections::HashMap; use std::rc::{Rc, Weak}; use crate::common::FilePosition; use crate::idl; use super::errors::ValidationError; use super::fieldset::Fieldset; use super::fqtn::FQTN; use super::namespace::Namespace; use super::options::Range; use super::r#enum::Enum; use super::r#struct::Struct; use super::typemap::TypeMap; #[derive(Clone)] pub enum Type { // builtin types None, Boolean, Integer, Float, String, UUID, Date, Time, DateTime, // complex types Option(Box<Type>), Result(Box<Type>, Box<Type>), Array(Box<Array>), Map(Box<Map>), // named Ref(TypeRef), // builtin (user provided) Builtin(String), } #[derive(Clone)] pub enum TypeRef { Enum(EnumRef), Struct(StructRef), Fieldset(FieldsetRef), Unresolved { fqtn: FQTN, generics: Vec<Type> }, } #[derive(Clone)] pub struct EnumRef { pub enum_: Weak<RefCell<Enum>>, pub generics: Vec<Type>, } #[derive(Clone)] pub struct StructRef { pub struct_: Weak<RefCell<Struct>>, pub generics: Vec<Type>, } #[derive(Clone)] pub struct FieldsetRef { pub fieldset: Weak<RefCell<Fieldset>>, pub generics: Vec<Type>, } #[derive(Clone)] pub struct Array { pub length: Range, pub item_type: Type, } #[derive(Clone)] pub struct Map { pub length: Range, pub key_type: Type, pub value_type: Type, } #[derive(Clone)] pub enum UserDefinedType { Enum(Rc<RefCell<Enum>>), Struct(Rc<RefCell<Struct>>), Fieldset(Rc<RefCell<Fieldset>>), } impl Type { pub(crate) fn from_idl_ref( ityperef: &idl::TypeRef, ns: &Namespace, builtin_types: &HashMap<String, String>, ) -> Self { // FIXME this should fail with an error when fqtn.ns is not empty match ityperef.name.as_str() { "None" => Self::None, "Boolean" => Self::Boolean, "Integer" => Self::Integer, "Float" => Self::Float, "String" => Self::String, "UUID" => Self::UUID, "Date" => Self::Date, "Time" => Self::Time, "DateTime" => Self::DateTime, "Option" => Self::Option(Box::new(Type::from_idl( &ityperef.generics[0], ns, &builtin_types, ))), "Result" => Self::Result( Box::new(Type::from_idl(&ityperef.generics[0], ns, &builtin_types)), Box::new(Type::from_idl(&ityperef.generics[1], ns, &builtin_types)), ), name => match builtin_types.get(name) { Some(value) => Self::Builtin(value.to_owned()), None => Self::Ref(TypeRef::from_idl(ityperef, ns, &builtin_types)), }, } } pub(crate) fn from_idl( itype: &idl::Type, ns: &Namespace, builtin_types: &HashMap<String, String>, ) -> Self { match itype { idl::Type::Ref(ityperef) => Self::from_idl_ref(&ityperef, &ns, &builtin_types), idl::Type::Array(item_type) => Self::Array(Box::new(Array { item_type: Self::from_idl(item_type, ns, &builtin_types), length: Range { start: None, end: None, }, // FIXME })), idl::Type::Map(key_type, value_type) => Self::Map(Box::new(Map { key_type: Self::from_idl(key_type, ns, &builtin_types), value_type: Self::from_idl(value_type, ns, &builtin_types), length: Range { start: None, end: None, }, // FIXME })), } } pub(crate) fn resolve(&mut self, type_map: &TypeMap) -> Result<(), ValidationError> { match self { Self::None | Self::Boolean | Self::Integer | Self::Float | Self::String | Self::UUID | Self::Date | Self::Time | Self::DateTime => Ok(()), // complex types Self::Option(some) => some.resolve(type_map), Self::Result(ok, err) => { ok.resolve(type_map)?; err.resolve(type_map)?; Ok(()) } Self::Array(array) => array.resolve(type_map), Self::Map(map) => map.resolve(type_map), // named Self::Ref(typeref) => typeref.resolve(type_map), // builtin (user defined) Self::Builtin(_) => Ok(()), } } /// Returns wether this type is scalar type or not. pub(crate) fn is_scalar(&self) -> bool { match self { Self::None | Self::Boolean | Self::Integer | Self::Float | Self::String | Self::UUID | Self::Date | Self::Time | Self::DateTime => true, Self::Option(type_) => type_.is_scalar(), Self::Result(_, _) => false, Self::Array(_) => false, Self::Map(_) => false, Self::Ref(_) => false, Self::Builtin(_) => true, } } } impl TypeRef { pub(crate) fn from_idl( ityperef: &idl::TypeRef, ns: &Namespace, builtin_types: &HashMap<String, String>, ) -> Self { Self::Unresolved { fqtn: FQTN::from_idl(ityperef, ns), generics: ityperef .generics .iter() .map(|itype| Type::from_idl(itype, ns, &builtin_types)) .collect(), } } pub(crate) fn resolve(&mut self, type_map: &TypeMap) -> Result<(), ValidationError> { if let Self::Unresolved { fqtn, generics } = self { let ud_type = type_map.get(fqtn); let position = FilePosition { line: 0, column: 0 }; // FIXME *self = match ud_type { Some(ud_type) => { if generics.len() != ud_type.generics().len() { return Err(ValidationError::GenericsMissmatch { fqtn: fqtn.clone(), position, }); } match ud_type { UserDefinedType::Enum(enum_) => TypeRef::Enum(EnumRef { enum_: Rc::downgrade(&enum_), generics: generics.clone(), }), UserDefinedType::Struct(struct_) => TypeRef::Struct(StructRef { struct_: Rc::downgrade(&struct_), generics: generics.clone(), }), UserDefinedType::Fieldset(fieldset) => TypeRef::Fieldset(FieldsetRef { fieldset: Rc::downgrade(&fieldset), generics: generics.clone(), }), } } None => { return Err(ValidationError::NoSuchType { fqtn: fqtn.clone(), position, }) } } } Ok(()) } pub fn fqtn(&self) -> FQTN { match self { TypeRef::Enum(enum_) => enum_.enum_.upgrade().unwrap().borrow().fqtn.clone(), TypeRef::Struct(struct_) => struct_.struct_.upgrade().unwrap().borrow().fqtn.clone(), TypeRef::Fieldset(fieldset) => { fieldset.fieldset.upgrade().unwrap().borrow().fqtn.clone() } TypeRef::Unresolved { fqtn, generics: _ } => fqtn.clone(), } } pub fn generics(&self) -> &Vec<Type> { match self { TypeRef::Enum(enum_) => &enum_.generics, TypeRef::Struct(struct_) => &struct_.generics, TypeRef::Fieldset(fieldset) => &fieldset.generics, TypeRef::Unresolved { fqtn: _, generics } => generics, } } } impl Array { pub(crate) fn resolve(&mut self, type_map: &TypeMap) -> Result<(), ValidationError> { self.item_type.resolve(type_map) } } impl Map { pub(crate) fn resolve(&mut self, type_map: &TypeMap) -> Result<(), ValidationError> { self.key_type.resolve(type_map)?; self.value_type.resolve(type_map)?; Ok(()) } } impl UserDefinedType { pub fn fqtn(&self) -> FQTN { match self { Self::Enum(t) => t.borrow().fqtn.clone(), Self::Fieldset(t) => t.borrow().fqtn.clone(), Self::Struct(t) => t.borrow().fqtn.clone(), } } pub(crate) fn resolve(&mut self, type_map: &TypeMap) -> Result<(), ValidationError> { match self { Self::Enum(t) => t.borrow_mut().resolve(type_map), Self::Fieldset(t) => t.borrow_mut().resolve(type_map), Self::Struct(t) => t.borrow_mut().resolve(type_map), } } pub(crate) fn generics(&self) -> Vec<String> { match self { Self::Enum(t) => t.borrow().generics.clone(), Self::Fieldset(t) => t.borrow().generics.clone(), Self::Struct(t) => t.borrow().generics.clone(), } } }
use super::charset::Charset; pub trait DrawBox { fn new(content: Vec<String>, charset: Charset) -> Self; // Print the box fn print(&self); // Individual box parts fn print_top(&self); fn print_middle(&self); fn print_bottom(&self); } // Find the count of visible chars in a String fn count_visible_chars(input: &str) -> usize { strip_ansi_escapes::strip(input).unwrap().len() } // A simple box around the content pub struct SimpleBox { content: Vec<String>, charset: Charset, max_length: usize, } fn calculate_max_length(mut content: Vec<String>) -> usize { content.sort_unstable_by_key(|b| b.len()); match content.last() { Some(line) => line.len(), None => 0, } } impl DrawBox for SimpleBox { fn new(content: Vec<String>, charset: Charset) -> SimpleBox { // Get the longest line in the output let max_length = calculate_max_length(content.clone()); SimpleBox { content, charset, max_length, } } fn print(&self) { self.print_top(); self.print_middle(); self.print_bottom(); } fn print_top(&self) { print!("{}", self.charset.corner_up_left); for _ in 0..(self.max_length + 2) { print!("{}", self.charset.horizontal) } println!("{}", self.charset.corner_up_right); } fn print_middle(&self) { for line in self.content.iter() { print!("{} {}", self.charset.vertical, line); let length: usize = count_visible_chars(line); // Pad shorter lines with spaces for _ in 0..(self.max_length - length) { print!(" "); } println!(" {}", self.charset.vertical); } } fn print_bottom(&self) { print!("{}", self.charset.corner_down_left); for _ in 0..(self.max_length + 2) { print!("{}", self.charset.horizontal) } println!("{}", self.charset.corner_down_right); } } // A simple box around the content pub struct TitleBox<'a> { title: &'a str, content: Vec<String>, charset: Charset, max_length: usize, } impl<'a> DrawBox for TitleBox<'a> { fn new(content: Vec<String>, charset: Charset) -> TitleBox<'a> { // Get the longest line in the output let max_length = calculate_max_length(content.clone()); TitleBox { title: "", content, charset, max_length, } } fn print(&self) { self.print_top(); self.print_middle(); self.print_bottom(); } fn print_top(&self) { print!( "{}{}{} {} {}", self.charset.corner_up_left, self.charset.horizontal, self.charset.t_left, self.title, self.charset.t_right ); let title_length = self.title.len() + 5; let num_pad: usize = match title_length.cmp(&self.max_length) { std::cmp::Ordering::Less => self.max_length + 2 - title_length, std::cmp::Ordering::Greater => 1, std::cmp::Ordering::Equal => 2, }; for _ in 0..num_pad { print!("{}", self.charset.horizontal) } println!("{}", self.charset.corner_up_right); } fn print_middle(&self) { for line in self.content.iter() { print!("{} {}", self.charset.vertical, line); // Pad shorter lines with spaces let length: usize = count_visible_chars(line); let title_length = self.title.len() + 5; let num_pad: usize = match title_length.cmp(&self.max_length) { std::cmp::Ordering::Less => self.max_length - length, std::cmp::Ordering::Greater => title_length - length - 1, std::cmp::Ordering::Equal => title_length - length, }; for _ in 0..num_pad { print!(" "); } println!(" {}", self.charset.vertical); } } fn print_bottom(&self) { print!("{}", self.charset.corner_down_left); let title_length = self.title.len() + 5; let num_pad: usize = match title_length.cmp(&self.max_length) { std::cmp::Ordering::Less => self.max_length + 2, std::cmp::Ordering::Greater => title_length + 1, std::cmp::Ordering::Equal => title_length + 2, }; for _ in 0..num_pad { print!("{}", self.charset.horizontal) } println!("{}", self.charset.corner_down_right); } } impl<'a> TitleBox<'a> { pub fn set_title(&mut self, title: &'a str) { self.title = title; } } #[cfg(test)] mod tests { use super::*; #[test] fn test_count_visible_chars() { assert_eq!(3, count_visible_chars("abc"), "Three normal ASCII chars"); assert_eq!( 3, count_visible_chars("\u{001b}[31mabc\u{001b}[0m"), "Three ASCII chars made red" ); } #[test] fn test_calculate_max_length() { let lines: Vec<String> = vec![ String::from("Hello"), String::from("Hola"), String::from("Caio"), ]; assert_eq!(calculate_max_length(lines), 5); let empty: Vec<String> = vec![]; assert_eq!(calculate_max_length(empty), 0); } }
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. pub fn parse_http_generic_error( response: &http::Response<bytes::Bytes>, ) -> Result<smithy_types::Error, smithy_json::deserialize::Error> { crate::json_errors::parse_generic_error(response.body(), response.headers()) } pub fn deser_structure_batch_size_limit_exceeded_exceptionjson_err( input: &[u8], mut builder: crate::error::batch_size_limit_exceeded_exception::Builder, ) -> Result< crate::error::batch_size_limit_exceeded_exception::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_structure_internal_server_exceptionjson_err( input: &[u8], mut builder: crate::error::internal_server_exception::Builder, ) -> Result<crate::error::internal_server_exception::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_structure_invalid_request_exceptionjson_err( input: &[u8], mut builder: crate::error::invalid_request_exception::Builder, ) -> Result<crate::error::invalid_request_exception::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_structure_text_size_limit_exceeded_exceptionjson_err( input: &[u8], mut builder: crate::error::text_size_limit_exceeded_exception::Builder, ) -> Result< crate::error::text_size_limit_exceeded_exception::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_batch_detect_dominant_language( input: &[u8], mut builder: crate::output::batch_detect_dominant_language_output::Builder, ) -> Result< crate::output::batch_detect_dominant_language_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "ResultList" => { builder = builder.set_result_list( crate::json_deser::deser_list_list_of_detect_dominant_language_result( tokens, )?, ); } "ErrorList" => { builder = builder.set_error_list( crate::json_deser::deser_list_batch_item_error_list(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_structure_unsupported_language_exceptionjson_err( input: &[u8], mut builder: crate::error::unsupported_language_exception::Builder, ) -> Result<crate::error::unsupported_language_exception::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_batch_detect_entities( input: &[u8], mut builder: crate::output::batch_detect_entities_output::Builder, ) -> Result<crate::output::batch_detect_entities_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "ResultList" => { builder = builder.set_result_list( crate::json_deser::deser_list_list_of_detect_entities_result(tokens)?, ); } "ErrorList" => { builder = builder.set_error_list( crate::json_deser::deser_list_batch_item_error_list(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_batch_detect_key_phrases( input: &[u8], mut builder: crate::output::batch_detect_key_phrases_output::Builder, ) -> Result<crate::output::batch_detect_key_phrases_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "ResultList" => { builder = builder.set_result_list( crate::json_deser::deser_list_list_of_detect_key_phrases_result( tokens, )?, ); } "ErrorList" => { builder = builder.set_error_list( crate::json_deser::deser_list_batch_item_error_list(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_batch_detect_sentiment( input: &[u8], mut builder: crate::output::batch_detect_sentiment_output::Builder, ) -> Result<crate::output::batch_detect_sentiment_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "ResultList" => { builder = builder.set_result_list( crate::json_deser::deser_list_list_of_detect_sentiment_result(tokens)?, ); } "ErrorList" => { builder = builder.set_error_list( crate::json_deser::deser_list_batch_item_error_list(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_batch_detect_syntax( input: &[u8], mut builder: crate::output::batch_detect_syntax_output::Builder, ) -> Result<crate::output::batch_detect_syntax_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "ResultList" => { builder = builder.set_result_list( crate::json_deser::deser_list_list_of_detect_syntax_result(tokens)?, ); } "ErrorList" => { builder = builder.set_error_list( crate::json_deser::deser_list_batch_item_error_list(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_structure_resource_unavailable_exceptionjson_err( input: &[u8], mut builder: crate::error::resource_unavailable_exception::Builder, ) -> Result<crate::error::resource_unavailable_exception::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_classify_document( input: &[u8], mut builder: crate::output::classify_document_output::Builder, ) -> Result<crate::output::classify_document_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Classes" => { builder = builder .set_classes(crate::json_deser::deser_list_list_of_classes(tokens)?); } "Labels" => { builder = builder .set_labels(crate::json_deser::deser_list_list_of_labels(tokens)?); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_contains_pii_entities( input: &[u8], mut builder: crate::output::contains_pii_entities_output::Builder, ) -> Result<crate::output::contains_pii_entities_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Labels" => { builder = builder.set_labels( crate::json_deser::deser_list_list_of_entity_labels(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_structure_kms_key_validation_exceptionjson_err( input: &[u8], mut builder: crate::error::kms_key_validation_exception::Builder, ) -> Result<crate::error::kms_key_validation_exception::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_structure_resource_in_use_exceptionjson_err( input: &[u8], mut builder: crate::error::resource_in_use_exception::Builder, ) -> Result<crate::error::resource_in_use_exception::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_structure_resource_limit_exceeded_exceptionjson_err( input: &[u8], mut builder: crate::error::resource_limit_exceeded_exception::Builder, ) -> Result<crate::error::resource_limit_exceeded_exception::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_structure_too_many_requests_exceptionjson_err( input: &[u8], mut builder: crate::error::too_many_requests_exception::Builder, ) -> Result<crate::error::too_many_requests_exception::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_structure_too_many_tags_exceptionjson_err( input: &[u8], mut builder: crate::error::too_many_tags_exception::Builder, ) -> Result<crate::error::too_many_tags_exception::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_create_document_classifier( input: &[u8], mut builder: crate::output::create_document_classifier_output::Builder, ) -> Result< crate::output::create_document_classifier_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "DocumentClassifierArn" => { builder = builder.set_document_classifier_arn( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_structure_resource_not_found_exceptionjson_err( input: &[u8], mut builder: crate::error::resource_not_found_exception::Builder, ) -> Result<crate::error::resource_not_found_exception::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_create_endpoint( input: &[u8], mut builder: crate::output::create_endpoint_output::Builder, ) -> Result<crate::output::create_endpoint_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "EndpointArn" => { builder = builder.set_endpoint_arn( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_create_entity_recognizer( input: &[u8], mut builder: crate::output::create_entity_recognizer_output::Builder, ) -> Result<crate::output::create_entity_recognizer_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "EntityRecognizerArn" => { builder = builder.set_entity_recognizer_arn( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_structure_job_not_found_exceptionjson_err( input: &[u8], mut builder: crate::error::job_not_found_exception::Builder, ) -> Result<crate::error::job_not_found_exception::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_describe_document_classification_job( input: &[u8], mut builder: crate::output::describe_document_classification_job_output::Builder, ) -> Result< crate::output::describe_document_classification_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "DocumentClassificationJobProperties" => { builder = builder.set_document_classification_job_properties( crate::json_deser::deser_structure_document_classification_job_properties(tokens)? ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_describe_document_classifier( input: &[u8], mut builder: crate::output::describe_document_classifier_output::Builder, ) -> Result< crate::output::describe_document_classifier_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "DocumentClassifierProperties" => { builder = builder.set_document_classifier_properties( crate::json_deser::deser_structure_document_classifier_properties( tokens, )?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_describe_dominant_language_detection_job( input: &[u8], mut builder: crate::output::describe_dominant_language_detection_job_output::Builder, ) -> Result< crate::output::describe_dominant_language_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "DominantLanguageDetectionJobProperties" => { builder = builder.set_dominant_language_detection_job_properties( crate::json_deser::deser_structure_dominant_language_detection_job_properties(tokens)? ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_describe_endpoint( input: &[u8], mut builder: crate::output::describe_endpoint_output::Builder, ) -> Result<crate::output::describe_endpoint_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "EndpointProperties" => { builder = builder.set_endpoint_properties( crate::json_deser::deser_structure_endpoint_properties(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_describe_entities_detection_job( input: &[u8], mut builder: crate::output::describe_entities_detection_job_output::Builder, ) -> Result< crate::output::describe_entities_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "EntitiesDetectionJobProperties" => { builder = builder.set_entities_detection_job_properties( crate::json_deser::deser_structure_entities_detection_job_properties( tokens, )?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_describe_entity_recognizer( input: &[u8], mut builder: crate::output::describe_entity_recognizer_output::Builder, ) -> Result< crate::output::describe_entity_recognizer_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "EntityRecognizerProperties" => { builder = builder.set_entity_recognizer_properties( crate::json_deser::deser_structure_entity_recognizer_properties( tokens, )?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_describe_events_detection_job( input: &[u8], mut builder: crate::output::describe_events_detection_job_output::Builder, ) -> Result< crate::output::describe_events_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "EventsDetectionJobProperties" => { builder = builder.set_events_detection_job_properties( crate::json_deser::deser_structure_events_detection_job_properties( tokens, )?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_describe_key_phrases_detection_job( input: &[u8], mut builder: crate::output::describe_key_phrases_detection_job_output::Builder, ) -> Result< crate::output::describe_key_phrases_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "KeyPhrasesDetectionJobProperties" => { builder = builder.set_key_phrases_detection_job_properties( crate::json_deser::deser_structure_key_phrases_detection_job_properties(tokens)? ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_describe_pii_entities_detection_job( input: &[u8], mut builder: crate::output::describe_pii_entities_detection_job_output::Builder, ) -> Result< crate::output::describe_pii_entities_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "PiiEntitiesDetectionJobProperties" => { builder = builder.set_pii_entities_detection_job_properties( crate::json_deser::deser_structure_pii_entities_detection_job_properties(tokens)? ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_describe_sentiment_detection_job( input: &[u8], mut builder: crate::output::describe_sentiment_detection_job_output::Builder, ) -> Result< crate::output::describe_sentiment_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "SentimentDetectionJobProperties" => { builder = builder.set_sentiment_detection_job_properties( crate::json_deser::deser_structure_sentiment_detection_job_properties( tokens, )?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_describe_topics_detection_job( input: &[u8], mut builder: crate::output::describe_topics_detection_job_output::Builder, ) -> Result< crate::output::describe_topics_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "TopicsDetectionJobProperties" => { builder = builder.set_topics_detection_job_properties( crate::json_deser::deser_structure_topics_detection_job_properties( tokens, )?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_detect_dominant_language( input: &[u8], mut builder: crate::output::detect_dominant_language_output::Builder, ) -> Result<crate::output::detect_dominant_language_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Languages" => { builder = builder.set_languages( crate::json_deser::deser_list_list_of_dominant_languages(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_detect_entities( input: &[u8], mut builder: crate::output::detect_entities_output::Builder, ) -> Result<crate::output::detect_entities_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Entities" => { builder = builder .set_entities(crate::json_deser::deser_list_list_of_entities(tokens)?); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_detect_key_phrases( input: &[u8], mut builder: crate::output::detect_key_phrases_output::Builder, ) -> Result<crate::output::detect_key_phrases_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "KeyPhrases" => { builder = builder.set_key_phrases( crate::json_deser::deser_list_list_of_key_phrases(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_detect_pii_entities( input: &[u8], mut builder: crate::output::detect_pii_entities_output::Builder, ) -> Result<crate::output::detect_pii_entities_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Entities" => { builder = builder.set_entities( crate::json_deser::deser_list_list_of_pii_entities(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_detect_sentiment( input: &[u8], mut builder: crate::output::detect_sentiment_output::Builder, ) -> Result<crate::output::detect_sentiment_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Sentiment" => { builder = builder.set_sentiment( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| { s.to_unescaped() .map(|u| crate::model::SentimentType::from(u.as_ref())) }) .transpose()?, ); } "SentimentScore" => { builder = builder.set_sentiment_score( crate::json_deser::deser_structure_sentiment_score(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_detect_syntax( input: &[u8], mut builder: crate::output::detect_syntax_output::Builder, ) -> Result<crate::output::detect_syntax_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "SyntaxTokens" => { builder = builder.set_syntax_tokens( crate::json_deser::deser_list_list_of_syntax_tokens(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_structure_invalid_filter_exceptionjson_err( input: &[u8], mut builder: crate::error::invalid_filter_exception::Builder, ) -> Result<crate::error::invalid_filter_exception::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_list_document_classification_jobs( input: &[u8], mut builder: crate::output::list_document_classification_jobs_output::Builder, ) -> Result< crate::output::list_document_classification_jobs_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "DocumentClassificationJobPropertiesList" => { builder = builder.set_document_classification_job_properties_list( crate::json_deser::deser_list_document_classification_job_properties_list(tokens)? ); } "NextToken" => { builder = builder.set_next_token( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_list_document_classifiers( input: &[u8], mut builder: crate::output::list_document_classifiers_output::Builder, ) -> Result<crate::output::list_document_classifiers_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "DocumentClassifierPropertiesList" => { builder = builder.set_document_classifier_properties_list( crate::json_deser::deser_list_document_classifier_properties_list( tokens, )?, ); } "NextToken" => { builder = builder.set_next_token( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_list_dominant_language_detection_jobs( input: &[u8], mut builder: crate::output::list_dominant_language_detection_jobs_output::Builder, ) -> Result< crate::output::list_dominant_language_detection_jobs_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "DominantLanguageDetectionJobPropertiesList" => { builder = builder.set_dominant_language_detection_job_properties_list( crate::json_deser::deser_list_dominant_language_detection_job_properties_list(tokens)? ); } "NextToken" => { builder = builder.set_next_token( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_list_endpoints( input: &[u8], mut builder: crate::output::list_endpoints_output::Builder, ) -> Result<crate::output::list_endpoints_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "EndpointPropertiesList" => { builder = builder.set_endpoint_properties_list( crate::json_deser::deser_list_endpoint_properties_list(tokens)?, ); } "NextToken" => { builder = builder.set_next_token( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_list_entities_detection_jobs( input: &[u8], mut builder: crate::output::list_entities_detection_jobs_output::Builder, ) -> Result< crate::output::list_entities_detection_jobs_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "EntitiesDetectionJobPropertiesList" => { builder = builder.set_entities_detection_job_properties_list( crate::json_deser::deser_list_entities_detection_job_properties_list( tokens, )?, ); } "NextToken" => { builder = builder.set_next_token( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_list_entity_recognizers( input: &[u8], mut builder: crate::output::list_entity_recognizers_output::Builder, ) -> Result<crate::output::list_entity_recognizers_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "EntityRecognizerPropertiesList" => { builder = builder.set_entity_recognizer_properties_list( crate::json_deser::deser_list_entity_recognizer_properties_list( tokens, )?, ); } "NextToken" => { builder = builder.set_next_token( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_list_events_detection_jobs( input: &[u8], mut builder: crate::output::list_events_detection_jobs_output::Builder, ) -> Result< crate::output::list_events_detection_jobs_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "EventsDetectionJobPropertiesList" => { builder = builder.set_events_detection_job_properties_list( crate::json_deser::deser_list_events_detection_job_properties_list( tokens, )?, ); } "NextToken" => { builder = builder.set_next_token( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_list_key_phrases_detection_jobs( input: &[u8], mut builder: crate::output::list_key_phrases_detection_jobs_output::Builder, ) -> Result< crate::output::list_key_phrases_detection_jobs_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "KeyPhrasesDetectionJobPropertiesList" => { builder = builder.set_key_phrases_detection_job_properties_list( crate::json_deser::deser_list_key_phrases_detection_job_properties_list(tokens)? ); } "NextToken" => { builder = builder.set_next_token( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_list_pii_entities_detection_jobs( input: &[u8], mut builder: crate::output::list_pii_entities_detection_jobs_output::Builder, ) -> Result< crate::output::list_pii_entities_detection_jobs_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "PiiEntitiesDetectionJobPropertiesList" => { builder = builder.set_pii_entities_detection_job_properties_list( crate::json_deser::deser_list_pii_entities_detection_job_properties_list(tokens)? ); } "NextToken" => { builder = builder.set_next_token( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_list_sentiment_detection_jobs( input: &[u8], mut builder: crate::output::list_sentiment_detection_jobs_output::Builder, ) -> Result< crate::output::list_sentiment_detection_jobs_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "SentimentDetectionJobPropertiesList" => { builder = builder.set_sentiment_detection_job_properties_list( crate::json_deser::deser_list_sentiment_detection_job_properties_list( tokens, )?, ); } "NextToken" => { builder = builder.set_next_token( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_list_tags_for_resource( input: &[u8], mut builder: crate::output::list_tags_for_resource_output::Builder, ) -> Result<crate::output::list_tags_for_resource_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "ResourceArn" => { builder = builder.set_resource_arn( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "Tags" => { builder = builder.set_tags(crate::json_deser::deser_list_tag_list(tokens)?); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_list_topics_detection_jobs( input: &[u8], mut builder: crate::output::list_topics_detection_jobs_output::Builder, ) -> Result< crate::output::list_topics_detection_jobs_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "TopicsDetectionJobPropertiesList" => { builder = builder.set_topics_detection_job_properties_list( crate::json_deser::deser_list_topics_detection_job_properties_list( tokens, )?, ); } "NextToken" => { builder = builder.set_next_token( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_start_document_classification_job( input: &[u8], mut builder: crate::output::start_document_classification_job_output::Builder, ) -> Result< crate::output::start_document_classification_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobArn" => { builder = builder.set_job_arn( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_start_dominant_language_detection_job( input: &[u8], mut builder: crate::output::start_dominant_language_detection_job_output::Builder, ) -> Result< crate::output::start_dominant_language_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobArn" => { builder = builder.set_job_arn( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_start_entities_detection_job( input: &[u8], mut builder: crate::output::start_entities_detection_job_output::Builder, ) -> Result< crate::output::start_entities_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobArn" => { builder = builder.set_job_arn( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_start_events_detection_job( input: &[u8], mut builder: crate::output::start_events_detection_job_output::Builder, ) -> Result< crate::output::start_events_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobArn" => { builder = builder.set_job_arn( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_start_key_phrases_detection_job( input: &[u8], mut builder: crate::output::start_key_phrases_detection_job_output::Builder, ) -> Result< crate::output::start_key_phrases_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobArn" => { builder = builder.set_job_arn( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_start_pii_entities_detection_job( input: &[u8], mut builder: crate::output::start_pii_entities_detection_job_output::Builder, ) -> Result< crate::output::start_pii_entities_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobArn" => { builder = builder.set_job_arn( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_start_sentiment_detection_job( input: &[u8], mut builder: crate::output::start_sentiment_detection_job_output::Builder, ) -> Result< crate::output::start_sentiment_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobArn" => { builder = builder.set_job_arn( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_start_topics_detection_job( input: &[u8], mut builder: crate::output::start_topics_detection_job_output::Builder, ) -> Result< crate::output::start_topics_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobArn" => { builder = builder.set_job_arn( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_stop_dominant_language_detection_job( input: &[u8], mut builder: crate::output::stop_dominant_language_detection_job_output::Builder, ) -> Result< crate::output::stop_dominant_language_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_stop_entities_detection_job( input: &[u8], mut builder: crate::output::stop_entities_detection_job_output::Builder, ) -> Result< crate::output::stop_entities_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_stop_events_detection_job( input: &[u8], mut builder: crate::output::stop_events_detection_job_output::Builder, ) -> Result<crate::output::stop_events_detection_job_output::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_stop_key_phrases_detection_job( input: &[u8], mut builder: crate::output::stop_key_phrases_detection_job_output::Builder, ) -> Result< crate::output::stop_key_phrases_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_stop_pii_entities_detection_job( input: &[u8], mut builder: crate::output::stop_pii_entities_detection_job_output::Builder, ) -> Result< crate::output::stop_pii_entities_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_operation_stop_sentiment_detection_job( input: &[u8], mut builder: crate::output::stop_sentiment_detection_job_output::Builder, ) -> Result< crate::output::stop_sentiment_detection_job_output::Builder, smithy_json::deserialize::Error, > { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_structure_concurrent_modification_exceptionjson_err( input: &[u8], mut builder: crate::error::concurrent_modification_exception::Builder, ) -> Result<crate::error::concurrent_modification_exception::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn deser_structure_too_many_tag_keys_exceptionjson_err( input: &[u8], mut builder: crate::error::too_many_tag_keys_exception::Builder, ) -> Result<crate::error::too_many_tag_keys_exception::Builder, smithy_json::deserialize::Error> { let mut tokens_owned = smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(input)) .peekable(); let tokens = &mut tokens_owned; smithy_json::deserialize::token::expect_start_object(tokens.next())?; loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } if tokens.next().is_some() { return Err(smithy_json::deserialize::Error::custom( "found more JSON tokens after completing parsing", )); } Ok(builder) } pub fn or_empty_doc(data: &[u8]) -> &[u8] { if data.is_empty() { b"{}" } else { data } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_list_of_detect_dominant_language_result<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::BatchDetectDominantLanguageItemResult>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_batch_detect_dominant_language_item_result(tokens)? ; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_batch_item_error_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<std::vec::Vec<crate::model::BatchItemError>>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_batch_item_error(tokens)?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_list_of_detect_entities_result<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::BatchDetectEntitiesItemResult>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_batch_detect_entities_item_result( tokens, )?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_list_of_detect_key_phrases_result<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::BatchDetectKeyPhrasesItemResult>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_batch_detect_key_phrases_item_result(tokens)? ; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_list_of_detect_sentiment_result<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::BatchDetectSentimentItemResult>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_batch_detect_sentiment_item_result( tokens, )?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_list_of_detect_syntax_result<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::BatchDetectSyntaxItemResult>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_batch_detect_syntax_item_result( tokens, )?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_list_of_classes<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<std::vec::Vec<crate::model::DocumentClass>>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_document_class(tokens)?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_list_of_labels<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<std::vec::Vec<crate::model::DocumentLabel>>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_document_label(tokens)?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_list_of_entity_labels<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<std::vec::Vec<crate::model::EntityLabel>>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_entity_label(tokens)?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } pub fn deser_structure_document_classification_job_properties<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<crate::model::DocumentClassificationJobProperties>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::DocumentClassificationJobProperties::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobArn" => { builder = builder.set_job_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobName" => { builder = builder.set_job_name( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "SubmitTime" => { builder = builder.set_submit_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "EndTime" => { builder = builder.set_end_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "DocumentClassifierArn" => { builder = builder.set_document_classifier_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "InputDataConfig" => { builder = builder.set_input_data_config( crate::json_deser::deser_structure_input_data_config(tokens)?, ); } "OutputDataConfig" => { builder = builder.set_output_data_config( crate::json_deser::deser_structure_output_data_config(tokens)?, ); } "DataAccessRoleArn" => { builder = builder.set_data_access_role_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "VolumeKmsKeyId" => { builder = builder.set_volume_kms_key_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "VpcConfig" => { builder = builder.set_vpc_config( crate::json_deser::deser_structure_vpc_config(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_document_classifier_properties<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::DocumentClassifierProperties>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::DocumentClassifierProperties::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "DocumentClassifierArn" => { builder = builder.set_document_classifier_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "LanguageCode" => { builder = builder.set_language_code( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::LanguageCode::from(u.as_ref())) }) .transpose()?, ); } "Status" => { builder = builder.set_status( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::ModelStatus::from(u.as_ref())) }) .transpose()?, ); } "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "SubmitTime" => { builder = builder.set_submit_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "EndTime" => { builder = builder.set_end_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "TrainingStartTime" => { builder = builder.set_training_start_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "TrainingEndTime" => { builder = builder.set_training_end_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "InputDataConfig" => { builder = builder.set_input_data_config( crate::json_deser::deser_structure_document_classifier_input_data_config(tokens)? ); } "OutputDataConfig" => { builder = builder.set_output_data_config( crate::json_deser::deser_structure_document_classifier_output_data_config(tokens)? ); } "ClassifierMetadata" => { builder = builder.set_classifier_metadata( crate::json_deser::deser_structure_classifier_metadata(tokens)?, ); } "DataAccessRoleArn" => { builder = builder.set_data_access_role_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "VolumeKmsKeyId" => { builder = builder.set_volume_kms_key_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "VpcConfig" => { builder = builder.set_vpc_config( crate::json_deser::deser_structure_vpc_config(tokens)?, ); } "Mode" => { builder = builder.set_mode( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped().map(|u| { crate::model::DocumentClassifierMode::from(u.as_ref()) }) }) .transpose()?, ); } "ModelKmsKeyId" => { builder = builder.set_model_kms_key_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_dominant_language_detection_job_properties<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<crate::model::DominantLanguageDetectionJobProperties>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::DominantLanguageDetectionJobProperties::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobArn" => { builder = builder.set_job_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobName" => { builder = builder.set_job_name( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "SubmitTime" => { builder = builder.set_submit_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "EndTime" => { builder = builder.set_end_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "InputDataConfig" => { builder = builder.set_input_data_config( crate::json_deser::deser_structure_input_data_config(tokens)?, ); } "OutputDataConfig" => { builder = builder.set_output_data_config( crate::json_deser::deser_structure_output_data_config(tokens)?, ); } "DataAccessRoleArn" => { builder = builder.set_data_access_role_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "VolumeKmsKeyId" => { builder = builder.set_volume_kms_key_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "VpcConfig" => { builder = builder.set_vpc_config( crate::json_deser::deser_structure_vpc_config(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_endpoint_properties<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::EndpointProperties>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::EndpointProperties::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "EndpointArn" => { builder = builder.set_endpoint_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "Status" => { builder = builder.set_status( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::EndpointStatus::from(u.as_ref())) }) .transpose()?, ); } "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "ModelArn" => { builder = builder.set_model_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "DesiredInferenceUnits" => { builder = builder.set_desired_inference_units( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "CurrentInferenceUnits" => { builder = builder.set_current_inference_units( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "CreationTime" => { builder = builder.set_creation_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "LastModifiedTime" => { builder = builder.set_last_modified_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "DataAccessRoleArn" => { builder = builder.set_data_access_role_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_entities_detection_job_properties<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::EntitiesDetectionJobProperties>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::EntitiesDetectionJobProperties::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobArn" => { builder = builder.set_job_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobName" => { builder = builder.set_job_name( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "SubmitTime" => { builder = builder.set_submit_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "EndTime" => { builder = builder.set_end_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "EntityRecognizerArn" => { builder = builder.set_entity_recognizer_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "InputDataConfig" => { builder = builder.set_input_data_config( crate::json_deser::deser_structure_input_data_config(tokens)?, ); } "OutputDataConfig" => { builder = builder.set_output_data_config( crate::json_deser::deser_structure_output_data_config(tokens)?, ); } "LanguageCode" => { builder = builder.set_language_code( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::LanguageCode::from(u.as_ref())) }) .transpose()?, ); } "DataAccessRoleArn" => { builder = builder.set_data_access_role_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "VolumeKmsKeyId" => { builder = builder.set_volume_kms_key_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "VpcConfig" => { builder = builder.set_vpc_config( crate::json_deser::deser_structure_vpc_config(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_entity_recognizer_properties<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::EntityRecognizerProperties>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::EntityRecognizerProperties::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "EntityRecognizerArn" => { builder = builder.set_entity_recognizer_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "LanguageCode" => { builder = builder.set_language_code( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::LanguageCode::from(u.as_ref())) }) .transpose()?, ); } "Status" => { builder = builder.set_status( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::ModelStatus::from(u.as_ref())) }) .transpose()?, ); } "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "SubmitTime" => { builder = builder.set_submit_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "EndTime" => { builder = builder.set_end_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "TrainingStartTime" => { builder = builder.set_training_start_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "TrainingEndTime" => { builder = builder.set_training_end_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "InputDataConfig" => { builder = builder.set_input_data_config( crate::json_deser::deser_structure_entity_recognizer_input_data_config(tokens)? ); } "RecognizerMetadata" => { builder = builder.set_recognizer_metadata( crate::json_deser::deser_structure_entity_recognizer_metadata( tokens, )?, ); } "DataAccessRoleArn" => { builder = builder.set_data_access_role_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "VolumeKmsKeyId" => { builder = builder.set_volume_kms_key_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "VpcConfig" => { builder = builder.set_vpc_config( crate::json_deser::deser_structure_vpc_config(tokens)?, ); } "ModelKmsKeyId" => { builder = builder.set_model_kms_key_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_events_detection_job_properties<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::EventsDetectionJobProperties>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::EventsDetectionJobProperties::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobArn" => { builder = builder.set_job_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobName" => { builder = builder.set_job_name( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "SubmitTime" => { builder = builder.set_submit_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "EndTime" => { builder = builder.set_end_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "InputDataConfig" => { builder = builder.set_input_data_config( crate::json_deser::deser_structure_input_data_config(tokens)?, ); } "OutputDataConfig" => { builder = builder.set_output_data_config( crate::json_deser::deser_structure_output_data_config(tokens)?, ); } "LanguageCode" => { builder = builder.set_language_code( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::LanguageCode::from(u.as_ref())) }) .transpose()?, ); } "DataAccessRoleArn" => { builder = builder.set_data_access_role_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "TargetEventTypes" => { builder = builder.set_target_event_types( crate::json_deser::deser_list_target_event_types(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_key_phrases_detection_job_properties<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::KeyPhrasesDetectionJobProperties>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::KeyPhrasesDetectionJobProperties::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobArn" => { builder = builder.set_job_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobName" => { builder = builder.set_job_name( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "SubmitTime" => { builder = builder.set_submit_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "EndTime" => { builder = builder.set_end_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "InputDataConfig" => { builder = builder.set_input_data_config( crate::json_deser::deser_structure_input_data_config(tokens)?, ); } "OutputDataConfig" => { builder = builder.set_output_data_config( crate::json_deser::deser_structure_output_data_config(tokens)?, ); } "LanguageCode" => { builder = builder.set_language_code( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::LanguageCode::from(u.as_ref())) }) .transpose()?, ); } "DataAccessRoleArn" => { builder = builder.set_data_access_role_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "VolumeKmsKeyId" => { builder = builder.set_volume_kms_key_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "VpcConfig" => { builder = builder.set_vpc_config( crate::json_deser::deser_structure_vpc_config(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_pii_entities_detection_job_properties<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::PiiEntitiesDetectionJobProperties>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::PiiEntitiesDetectionJobProperties::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobArn" => { builder = builder.set_job_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobName" => { builder = builder.set_job_name( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "SubmitTime" => { builder = builder.set_submit_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "EndTime" => { builder = builder.set_end_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "InputDataConfig" => { builder = builder.set_input_data_config( crate::json_deser::deser_structure_input_data_config(tokens)?, ); } "OutputDataConfig" => { builder = builder.set_output_data_config( crate::json_deser::deser_structure_pii_output_data_config( tokens, )?, ); } "RedactionConfig" => { builder = builder.set_redaction_config( crate::json_deser::deser_structure_redaction_config(tokens)?, ); } "LanguageCode" => { builder = builder.set_language_code( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::LanguageCode::from(u.as_ref())) }) .transpose()?, ); } "DataAccessRoleArn" => { builder = builder.set_data_access_role_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "Mode" => { builder = builder.set_mode( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped().map(|u| { crate::model::PiiEntitiesDetectionMode::from(u.as_ref()) }) }) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_sentiment_detection_job_properties<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::SentimentDetectionJobProperties>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::SentimentDetectionJobProperties::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobArn" => { builder = builder.set_job_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobName" => { builder = builder.set_job_name( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "SubmitTime" => { builder = builder.set_submit_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "EndTime" => { builder = builder.set_end_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "InputDataConfig" => { builder = builder.set_input_data_config( crate::json_deser::deser_structure_input_data_config(tokens)?, ); } "OutputDataConfig" => { builder = builder.set_output_data_config( crate::json_deser::deser_structure_output_data_config(tokens)?, ); } "LanguageCode" => { builder = builder.set_language_code( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::LanguageCode::from(u.as_ref())) }) .transpose()?, ); } "DataAccessRoleArn" => { builder = builder.set_data_access_role_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "VolumeKmsKeyId" => { builder = builder.set_volume_kms_key_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "VpcConfig" => { builder = builder.set_vpc_config( crate::json_deser::deser_structure_vpc_config(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_topics_detection_job_properties<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::TopicsDetectionJobProperties>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::TopicsDetectionJobProperties::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "JobId" => { builder = builder.set_job_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobArn" => { builder = builder.set_job_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobName" => { builder = builder.set_job_name( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "JobStatus" => { builder = builder.set_job_status( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::JobStatus::from(u.as_ref())) }) .transpose()?, ); } "Message" => { builder = builder.set_message( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "SubmitTime" => { builder = builder.set_submit_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "EndTime" => { builder = builder.set_end_time( smithy_json::deserialize::token::expect_timestamp_or_null( tokens.next(), smithy_types::instant::Format::EpochSeconds, )?, ); } "InputDataConfig" => { builder = builder.set_input_data_config( crate::json_deser::deser_structure_input_data_config(tokens)?, ); } "OutputDataConfig" => { builder = builder.set_output_data_config( crate::json_deser::deser_structure_output_data_config(tokens)?, ); } "NumberOfTopics" => { builder = builder.set_number_of_topics( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "DataAccessRoleArn" => { builder = builder.set_data_access_role_arn( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "VolumeKmsKeyId" => { builder = builder.set_volume_kms_key_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "VpcConfig" => { builder = builder.set_vpc_config( crate::json_deser::deser_structure_vpc_config(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_list_of_dominant_languages<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<std::vec::Vec<crate::model::DominantLanguage>>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_dominant_language(tokens)?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_list_of_entities<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<std::vec::Vec<crate::model::Entity>>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_entity(tokens)?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_list_of_key_phrases<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<std::vec::Vec<crate::model::KeyPhrase>>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_key_phrase(tokens)?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_list_of_pii_entities<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<std::vec::Vec<crate::model::PiiEntity>>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_pii_entity(tokens)?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } pub fn deser_structure_sentiment_score<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::SentimentScore>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::SentimentScore::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Positive" => { builder = builder.set_positive( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f32()), ); } "Negative" => { builder = builder.set_negative( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f32()), ); } "Neutral" => { builder = builder.set_neutral( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f32()), ); } "Mixed" => { builder = builder.set_mixed( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f32()), ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_list_of_syntax_tokens<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<std::vec::Vec<crate::model::SyntaxToken>>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_syntax_token(tokens)?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_document_classification_job_properties_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::DocumentClassificationJobProperties>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_document_classification_job_properties(tokens)? ; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_document_classifier_properties_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::DocumentClassifierProperties>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_document_classifier_properties( tokens, )?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_dominant_language_detection_job_properties_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::DominantLanguageDetectionJobProperties>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_dominant_language_detection_job_properties(tokens)? ; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_endpoint_properties_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<std::vec::Vec<crate::model::EndpointProperties>>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_endpoint_properties(tokens)?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_entities_detection_job_properties_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::EntitiesDetectionJobProperties>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_entities_detection_job_properties( tokens, )?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_entity_recognizer_properties_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::EntityRecognizerProperties>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_entity_recognizer_properties( tokens, )?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_events_detection_job_properties_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::EventsDetectionJobProperties>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_events_detection_job_properties( tokens, )?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_key_phrases_detection_job_properties_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::KeyPhrasesDetectionJobProperties>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_key_phrases_detection_job_properties(tokens)? ; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_pii_entities_detection_job_properties_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::PiiEntitiesDetectionJobProperties>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_pii_entities_detection_job_properties(tokens)? ; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_sentiment_detection_job_properties_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::SentimentDetectionJobProperties>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_sentiment_detection_job_properties( tokens, )?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_tag_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<std::vec::Vec<crate::model::Tag>>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_tag(tokens)?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_topics_detection_job_properties_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::TopicsDetectionJobProperties>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_topics_detection_job_properties( tokens, )?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } pub fn deser_structure_batch_detect_dominant_language_item_result<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<crate::model::BatchDetectDominantLanguageItemResult>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::BatchDetectDominantLanguageItemResult::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Index" => { builder = builder.set_index( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "Languages" => { builder = builder.set_languages( crate::json_deser::deser_list_list_of_dominant_languages( tokens, )?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_batch_item_error<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::BatchItemError>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::BatchItemError::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Index" => { builder = builder.set_index( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "ErrorCode" => { builder = builder.set_error_code( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "ErrorMessage" => { builder = builder.set_error_message( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_batch_detect_entities_item_result<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::BatchDetectEntitiesItemResult>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::BatchDetectEntitiesItemResult::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Index" => { builder = builder.set_index( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "Entities" => { builder = builder.set_entities( crate::json_deser::deser_list_list_of_entities(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_batch_detect_key_phrases_item_result<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::BatchDetectKeyPhrasesItemResult>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::BatchDetectKeyPhrasesItemResult::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Index" => { builder = builder.set_index( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "KeyPhrases" => { builder = builder.set_key_phrases( crate::json_deser::deser_list_list_of_key_phrases(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_batch_detect_sentiment_item_result<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::BatchDetectSentimentItemResult>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::BatchDetectSentimentItemResult::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Index" => { builder = builder.set_index( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "Sentiment" => { builder = builder.set_sentiment( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::SentimentType::from(u.as_ref())) }) .transpose()?, ); } "SentimentScore" => { builder = builder.set_sentiment_score( crate::json_deser::deser_structure_sentiment_score(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_batch_detect_syntax_item_result<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::BatchDetectSyntaxItemResult>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::BatchDetectSyntaxItemResult::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Index" => { builder = builder.set_index( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "SyntaxTokens" => { builder = builder.set_syntax_tokens( crate::json_deser::deser_list_list_of_syntax_tokens(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_document_class<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::DocumentClass>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::DocumentClass::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Name" => { builder = builder.set_name( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "Score" => { builder = builder.set_score( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f32()), ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_document_label<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::DocumentLabel>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::DocumentLabel::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Name" => { builder = builder.set_name( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "Score" => { builder = builder.set_score( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f32()), ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_entity_label<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::EntityLabel>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::EntityLabel::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Name" => { builder = builder.set_name( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::PiiEntityType::from(u.as_ref())) }) .transpose()?, ); } "Score" => { builder = builder.set_score( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f32()), ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_input_data_config<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::InputDataConfig>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::InputDataConfig::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "S3Uri" => { builder = builder.set_s3_uri( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "InputFormat" => { builder = builder.set_input_format( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::InputFormat::from(u.as_ref())) }) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_output_data_config<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::OutputDataConfig>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::OutputDataConfig::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "S3Uri" => { builder = builder.set_s3_uri( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "KmsKeyId" => { builder = builder.set_kms_key_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_vpc_config<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::VpcConfig>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::VpcConfig::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "SecurityGroupIds" => { builder = builder.set_security_group_ids( crate::json_deser::deser_list_security_group_ids(tokens)?, ); } "Subnets" => { builder = builder .set_subnets(crate::json_deser::deser_list_subnets(tokens)?); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_document_classifier_input_data_config<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::DocumentClassifierInputDataConfig>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::DocumentClassifierInputDataConfig::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "DataFormat" => { builder = builder.set_data_format( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped().map(|u| { crate::model::DocumentClassifierDataFormat::from( u.as_ref(), ) }) }) .transpose()?, ); } "S3Uri" => { builder = builder.set_s3_uri( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "LabelDelimiter" => { builder = builder.set_label_delimiter( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "AugmentedManifests" => { builder = builder.set_augmented_manifests( crate::json_deser::deser_list_document_classifier_augmented_manifests_list(tokens)? ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_document_classifier_output_data_config<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::DocumentClassifierOutputDataConfig>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::DocumentClassifierOutputDataConfig::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "S3Uri" => { builder = builder.set_s3_uri( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "KmsKeyId" => { builder = builder.set_kms_key_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_classifier_metadata<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::ClassifierMetadata>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::ClassifierMetadata::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "NumberOfLabels" => { builder = builder.set_number_of_labels( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "NumberOfTrainedDocuments" => { builder = builder.set_number_of_trained_documents( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "NumberOfTestDocuments" => { builder = builder.set_number_of_test_documents( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "EvaluationMetrics" => { builder = builder.set_evaluation_metrics( crate::json_deser::deser_structure_classifier_evaluation_metrics(tokens)? ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_entity_recognizer_input_data_config<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::EntityRecognizerInputDataConfig>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::EntityRecognizerInputDataConfig::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "DataFormat" => { builder = builder.set_data_format( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped().map(|u| { crate::model::EntityRecognizerDataFormat::from( u.as_ref(), ) }) }) .transpose()?, ); } "EntityTypes" => { builder = builder.set_entity_types( crate::json_deser::deser_list_entity_types_list(tokens)?, ); } "Documents" => { builder = builder.set_documents( crate::json_deser::deser_structure_entity_recognizer_documents( tokens, )?, ); } "Annotations" => { builder = builder.set_annotations( crate::json_deser::deser_structure_entity_recognizer_annotations(tokens)? ); } "EntityList" => { builder = builder.set_entity_list( crate::json_deser::deser_structure_entity_recognizer_entity_list(tokens)? ); } "AugmentedManifests" => { builder = builder.set_augmented_manifests( crate::json_deser::deser_list_entity_recognizer_augmented_manifests_list(tokens)? ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_entity_recognizer_metadata<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::EntityRecognizerMetadata>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::EntityRecognizerMetadata::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "NumberOfTrainedDocuments" => { builder = builder.set_number_of_trained_documents( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "NumberOfTestDocuments" => { builder = builder.set_number_of_test_documents( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "EvaluationMetrics" => { builder = builder.set_evaluation_metrics( crate::json_deser::deser_structure_entity_recognizer_evaluation_metrics(tokens)? ); } "EntityTypes" => { builder = builder.set_entity_types( crate::json_deser::deser_list_entity_recognizer_metadata_entity_types_list(tokens)? ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_target_event_types<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<std::vec::Vec<std::string::String>>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } pub fn deser_structure_pii_output_data_config<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::PiiOutputDataConfig>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::PiiOutputDataConfig::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "S3Uri" => { builder = builder.set_s3_uri( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "KmsKeyId" => { builder = builder.set_kms_key_id( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_redaction_config<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::RedactionConfig>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::RedactionConfig::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "PiiEntityTypes" => { builder = builder.set_pii_entity_types( crate::json_deser::deser_list_list_of_pii_entity_types(tokens)?, ); } "MaskMode" => { builder = builder.set_mask_mode( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped().map(|u| { crate::model::PiiEntitiesDetectionMaskMode::from( u.as_ref(), ) }) }) .transpose()?, ); } "MaskCharacter" => { builder = builder.set_mask_character( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_dominant_language<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::DominantLanguage>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::DominantLanguage::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "LanguageCode" => { builder = builder.set_language_code( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "Score" => { builder = builder.set_score( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f32()), ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_entity<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::Entity>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::Entity::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Score" => { builder = builder.set_score( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f32()), ); } "Type" => { builder = builder.set_type( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::EntityType::from(u.as_ref())) }) .transpose()?, ); } "Text" => { builder = builder.set_text( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "BeginOffset" => { builder = builder.set_begin_offset( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "EndOffset" => { builder = builder.set_end_offset( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_key_phrase<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::KeyPhrase>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::KeyPhrase::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Score" => { builder = builder.set_score( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f32()), ); } "Text" => { builder = builder.set_text( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "BeginOffset" => { builder = builder.set_begin_offset( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "EndOffset" => { builder = builder.set_end_offset( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_pii_entity<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::PiiEntity>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::PiiEntity::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Score" => { builder = builder.set_score( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f32()), ); } "Type" => { builder = builder.set_type( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped() .map(|u| crate::model::PiiEntityType::from(u.as_ref())) }) .transpose()?, ); } "BeginOffset" => { builder = builder.set_begin_offset( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "EndOffset" => { builder = builder.set_end_offset( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_syntax_token<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::SyntaxToken>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::SyntaxToken::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "TokenId" => { builder = builder.set_token_id( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "Text" => { builder = builder.set_text( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "BeginOffset" => { builder = builder.set_begin_offset( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "EndOffset" => { builder = builder.set_end_offset( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } "PartOfSpeech" => { builder = builder.set_part_of_speech( crate::json_deser::deser_structure_part_of_speech_tag(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_tag<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::Tag>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::Tag::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Key" => { builder = builder.set_key( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "Value" => { builder = builder.set_value( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_security_group_ids<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<std::vec::Vec<std::string::String>>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_subnets<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<std::vec::Vec<std::string::String>>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_document_classifier_augmented_manifests_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::AugmentedManifestsListItem>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_augmented_manifests_list_item( tokens, )?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } pub fn deser_structure_classifier_evaluation_metrics<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::ClassifierEvaluationMetrics>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::ClassifierEvaluationMetrics::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Accuracy" => { builder = builder.set_accuracy( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f64()), ); } "Precision" => { builder = builder.set_precision( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f64()), ); } "Recall" => { builder = builder.set_recall( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f64()), ); } "F1Score" => { builder = builder.set_f1_score( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f64()), ); } "MicroPrecision" => { builder = builder.set_micro_precision( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f64()), ); } "MicroRecall" => { builder = builder.set_micro_recall( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f64()), ); } "MicroF1Score" => { builder = builder.set_micro_f1_score( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f64()), ); } "HammingLoss" => { builder = builder.set_hamming_loss( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f64()), ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_entity_types_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<std::vec::Vec<crate::model::EntityTypesListItem>>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_entity_types_list_item(tokens)?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } pub fn deser_structure_entity_recognizer_documents<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::EntityRecognizerDocuments>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::EntityRecognizerDocuments::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "S3Uri" => { builder = builder.set_s3_uri( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_entity_recognizer_annotations<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::EntityRecognizerAnnotations>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::EntityRecognizerAnnotations::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "S3Uri" => { builder = builder.set_s3_uri( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_entity_recognizer_entity_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::EntityRecognizerEntityList>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::EntityRecognizerEntityList::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "S3Uri" => { builder = builder.set_s3_uri( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_entity_recognizer_augmented_manifests_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::AugmentedManifestsListItem>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_augmented_manifests_list_item( tokens, )?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } pub fn deser_structure_entity_recognizer_evaluation_metrics<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::EntityRecognizerEvaluationMetrics>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::EntityRecognizerEvaluationMetrics::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Precision" => { builder = builder.set_precision( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f64()), ); } "Recall" => { builder = builder.set_recall( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f64()), ); } "F1Score" => { builder = builder.set_f1_score( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f64()), ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_entity_recognizer_metadata_entity_types_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<std::vec::Vec<crate::model::EntityRecognizerMetadataEntityTypesListItem>>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = crate::json_deser::deser_structure_entity_recognizer_metadata_entity_types_list_item(tokens)? ; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_list_of_pii_entity_types<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<std::vec::Vec<crate::model::PiiEntityType>>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| { s.to_unescaped() .map(|u| crate::model::PiiEntityType::from(u.as_ref())) }) .transpose()?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } pub fn deser_structure_part_of_speech_tag<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::PartOfSpeechTag>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::PartOfSpeechTag::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Tag" => { builder = builder.set_tag( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| { s.to_unescaped().map(|u| { crate::model::PartOfSpeechTagType::from(u.as_ref()) }) }) .transpose()?, ); } "Score" => { builder = builder.set_score( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f32()), ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_augmented_manifests_list_item<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::AugmentedManifestsListItem>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::AugmentedManifestsListItem::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "S3Uri" => { builder = builder.set_s3_uri( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "AttributeNames" => { builder = builder.set_attribute_names( crate::json_deser::deser_list_attribute_names_list(tokens)?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_entity_types_list_item<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::EntityTypesListItem>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::EntityTypesListItem::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Type" => { builder = builder.set_type( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } pub fn deser_structure_entity_recognizer_metadata_entity_types_list_item<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result< Option<crate::model::EntityRecognizerMetadataEntityTypesListItem>, smithy_json::deserialize::Error, > where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::EntityRecognizerMetadataEntityTypesListItem::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Type" => { builder = builder.set_type( smithy_json::deserialize::token::expect_string_or_null( tokens.next(), )? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?, ); } "EvaluationMetrics" => { builder = builder.set_evaluation_metrics( crate::json_deser::deser_structure_entity_types_evaluation_metrics(tokens)? ); } "NumberOfTrainMentions" => { builder = builder.set_number_of_train_mentions( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_i32()), ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } } #[allow(clippy::type_complexity, non_snake_case)] pub fn deser_list_attribute_names_list<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<std::vec::Vec<std::string::String>>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartArray { .. }) => { let mut items = Vec::new(); loop { match tokens.peek() { Some(Ok(smithy_json::deserialize::Token::EndArray { .. })) => { tokens.next().transpose().unwrap(); break; } _ => { let value = smithy_json::deserialize::token::expect_string_or_null(tokens.next())? .map(|s| s.to_unescaped().map(|u| u.into_owned())) .transpose()?; if let Some(value) = value { items.push(value); } } } } Ok(Some(items)) } _ => Err(smithy_json::deserialize::Error::custom( "expected start array or null", )), } } pub fn deser_structure_entity_types_evaluation_metrics<'a, I>( tokens: &mut std::iter::Peekable<I>, ) -> Result<Option<crate::model::EntityTypesEvaluationMetrics>, smithy_json::deserialize::Error> where I: Iterator< Item = Result<smithy_json::deserialize::Token<'a>, smithy_json::deserialize::Error>, >, { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None), Some(smithy_json::deserialize::Token::StartObject { .. }) => { #[allow(unused_mut)] let mut builder = crate::model::EntityTypesEvaluationMetrics::builder(); loop { match tokens.next().transpose()? { Some(smithy_json::deserialize::Token::EndObject { .. }) => break, Some(smithy_json::deserialize::Token::ObjectKey { key, .. }) => { match key.to_unescaped()?.as_ref() { "Precision" => { builder = builder.set_precision( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f64()), ); } "Recall" => { builder = builder.set_recall( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f64()), ); } "F1Score" => { builder = builder.set_f1_score( smithy_json::deserialize::token::expect_number_or_null( tokens.next(), )? .map(|v| v.to_f64()), ); } _ => smithy_json::deserialize::token::skip_value(tokens)?, } } _ => { return Err(smithy_json::deserialize::Error::custom( "expected object key or end object", )) } } } Ok(Some(builder.build())) } _ => Err(smithy_json::deserialize::Error::custom( "expected start object or null", )), } }
extern crate web3; use common::*; use futures::{future, stream, FutureExt, StreamExt}; use web3::{transports, Web3}; const NODE_URL: &str = "http://localhost:8545"; // const NODE_URL: &str = "https://mainnet.infura.io/v3/c15ab95c12d441d19702cb4a0d1313e7"; const DB_PATH: &str = "_rpc_db"; #[tokio::main] async fn main() -> web3::Result<()> { let web3 = Web3::new(transports::Http::new(NODE_URL)?); let mut db = db::RpcDb::open(DB_PATH).expect("db open succeeds"); let from: u64 = 5232800; let to: u64 = 5232802; let mut queries = stream::iter(from..=to) .map(|block| { let web3_clone = web3.clone(); let txs_task = tokio::spawn(async move { rpc::block_txs(&web3_clone, block) .await .expect("query succeeds") .expect("block exists") }); let web3_clone = web3.clone(); let rec_task = tokio::spawn(async move { rpc::block_receipts_parity(&web3_clone, block) .await .expect("query succeeds") }); future::join3(txs_task, rec_task, future::ready(block)).map(|(txs, receipts, block)| { (txs.expect("future OK"), receipts.expect("future OK"), block) }) }) .buffered(10); while let Some((txs, receipts, block)) = queries.next().await { println!("{} query OK", block); db.put_receipts(block, receipts.clone()).expect("put OK"); db.put_txs(block, txs.clone()).expect("put OK"); println!("{} put OK", block); } Ok(()) }
//! A common library for constructing dataflow analyses on frawk programs. use crate::builtins::Variable; use crate::bytecode::{Accum, Instr, Reg}; use crate::common::{Graph, NodeIx, NumTy, WorkList}; use crate::compile::{HighLevel, Ty}; use hashbrown::{HashMap, HashSet}; use petgraph::{ visit::{Dfs, EdgeRef}, Direction, }; use std::convert::TryFrom; use std::hash::Hash; use std::mem; /// A trait used for implementing Join Semilattices with a type for custom (monotone) binary /// functions. We assume that Func::default() is the "join" operation on the Semilattice. pub trait JoinSemiLattice { type Func: Default; fn bottom() -> Self; // invoke(other, &Default::default()) ~ *self = join(self, other); fn invoke(&mut self, other: &Self, f: &Self::Func) -> bool /* changed */; } pub(crate) struct Analysis<J: JoinSemiLattice, K = Key> { sentinel: NodeIx, nodes: HashMap<K, NodeIx>, graph: Graph<J, J::Func>, queries: HashSet<NodeIx>, solved: bool, } impl<K, J: JoinSemiLattice> Default for Analysis<J, K> { fn default() -> Analysis<J, K> { let mut res = Analysis { sentinel: Default::default(), nodes: Default::default(), graph: Default::default(), queries: Default::default(), solved: false, }; res.sentinel = res.graph.add_node(J::bottom()); res } } impl<K: Eq + Hash, J: JoinSemiLattice> Analysis<J, K> { pub(crate) fn add_src(&mut self, k: impl Into<K>, mut v: J) { let ix = self.get_node(k); let weight = self.graph.node_weight_mut(ix).unwrap(); v.invoke(weight, &Default::default()); *weight = v; } pub(crate) fn add_dep(&mut self, dst: impl Into<K>, src: impl Into<K>, edge: J::Func) { // We add dependencies in reverse order, so we can dfs for relevant nodes later on let dst_ix = self.get_node(dst); let src_ix = self.get_node(src); self.graph.add_edge(dst_ix, src_ix, edge); } fn get_node(&mut self, k: impl Into<K>) -> NodeIx { let graph = &mut self.graph; self.nodes .entry(k.into()) .or_insert_with(|| graph.add_node(J::bottom())) .clone() } pub(crate) fn add_query(&mut self, k: impl Into<K>) { let ix = self.get_node(k); self.queries.insert(ix); } /// Call "solve" ahead of time to get a stable value here. pub(crate) fn query(&mut self, k: impl Into<K>) -> &J { self.solve(); let ix = self.get_node(k); assert!(self.queries.contains(&ix)); self.graph.node_weight(ix).unwrap() } /// Solves the constraints, then returns the join of all the queries. pub(crate) fn root(&mut self) -> &J { self.solve(); self.graph.node_weight(self.sentinel).unwrap() } fn populate(&mut self, wl: &mut WorkList<NodeIx>) { let sentinel = self.sentinel; for node in self.queries.iter().cloned() { self.graph.add_edge(sentinel, node, Default::default()); } let mut dfs = Dfs::new(&self.graph, sentinel); while let Some(ix) = dfs.next(&self.graph) { wl.insert(ix); } } fn solve(&mut self) { if self.solved { return; } self.solved = true; let mut wl = WorkList::default(); self.populate(&mut wl); while let Some(n) = wl.pop() { let mut start = mem::replace(self.graph.node_weight_mut(n).unwrap(), J::bottom()); let mut changed = false; for edge in self.graph.edges_directed(n, Direction::Outgoing) { let neigh = edge.target(); let func = edge.weight(); changed |= start.invoke(self.graph.node_weight(neigh).unwrap(), func); } mem::swap(&mut start, self.graph.node_weight_mut(n).unwrap()); if !changed { continue; } for neigh in self.graph.neighbors_directed(n, Direction::Incoming) { wl.insert(neigh) } } } } #[derive(Eq, PartialEq, Hash, Clone, Copy, Debug)] pub(crate) enum Key { Reg(NumTy, Ty), MapKey(NumTy, Ty), MapVal(NumTy, Ty), Rng, Var(Variable), VarKey(Variable), VarVal(Variable), Slot(NumTy, Ty), Func(NumTy), } impl<T> From<&Reg<T>> for Key where Reg<T>: Accum, { fn from(r: &Reg<T>) -> Key { let (reg, ty) = r.reflect(); Key::Reg(reg, ty) } } // TODO: loads/stores _of maps_ need to be bidirectional, because maps are referencey. // TODO: wire into string constants pub(crate) mod boilerplate { //! Some utility functions for discovering reads and writes in various parts of the IR. //! TODO: more precise tracking of function arguments. use super::*; pub(crate) fn visit_hl( inst: &HighLevel, cur_fn_id: NumTy, mut f: impl FnMut(/*dst*/ Key, /*src*/ Option<Key>), ) { use HighLevel::*; match inst { Call { func_id, dst_reg, dst_ty, args, } => { let dst_key = Key::Reg(*dst_reg, *dst_ty); f(dst_key.clone(), Some(Key::Func(*func_id))); for (reg, ty) in args.iter().cloned() { f(dst_key.clone(), Some(Key::Reg(reg, ty))); } } Ret(reg, ty) => { f(Key::Func(cur_fn_id), Some(Key::Reg(*reg, *ty))); } Phi(reg, ty, preds) => { for (_, pred_reg) in preds.iter() { f(Key::Reg(*reg, *ty), Some(Key::Reg(*pred_reg, *ty))); } } DropIter(..) => {} } } pub(crate) fn visit_ll(inst: &Instr, mut f: impl FnMut(/*dst*/ Key, /*src*/ Option<Key>)) { use Instr::*; match inst { StoreConstStr(dst, _) => f(dst.into(), None), StoreConstInt(dst, _) => f(dst.into(), None), StoreConstFloat(dst, _) => f(dst.into(), None), IntToStr(dst, src) => f(dst.into(), Some(src.into())), IntToFloat(dst, src) => f(dst.into(), Some(src.into())), FloatToStr(dst, src) => f(dst.into(), Some(src.into())), FloatToInt(dst, src) => f(dst.into(), Some(src.into())), StrToFloat(dst, src) => f(dst.into(), Some(src.into())), LenStr(dst, src) | StrToInt(dst, src) | HexStrToInt(dst, src) => f(dst.into(), Some(src.into())), Mov(ty, dst, src) => if !ty.is_array() { f(Key::Reg(*dst, *ty), Some(Key::Reg(*src, *ty))) } else { f(Key::MapKey(*dst, *ty), Some(Key::MapKey(*src, *ty))); f(Key::MapVal(*dst, *ty), Some(Key::MapVal(*src, *ty))); f(Key::MapKey(*src, *ty), Some(Key::MapKey(*dst, *ty))); f(Key::MapVal(*src, *ty), Some(Key::MapVal(*dst, *ty))); }, AddInt(dst, x, y) | MulInt(dst, x, y) | MinusInt(dst, x, y) | ModInt(dst, x, y) | Int2(_, dst, x, y) => { f(dst.into(), Some(x.into())); f(dst.into(), Some(y.into())); } AddFloat(dst, x, y) | MulFloat(dst, x, y) | MinusFloat(dst, x, y) | ModFloat(dst, x, y) | Div(dst, x, y) | Pow(dst, x, y) | Float2(_, dst, x, y) => { f(dst.into(), Some(x.into())); f(dst.into(), Some(y.into())); } Not(dst, src) | NegInt(dst, src) | Int1(_, dst, src) => f(dst.into(), Some(src.into())), NegFloat(dst, src) | Float1(_, dst, src) => f(dst.into(), Some(src.into())), NotStr(dst, src) => f(dst.into(), Some(src.into())), Rand(dst) => f(dst.into(), Some(Key::Rng)), Srand(old, new) => { f(old.into(), Some(Key::Rng)); f(Key::Rng, Some(new.into())); } ReseedRng(new) => f(Key::Rng, Some(new.into())), Concat(dst, x, y) => { f(dst.into(), Some(x.into())); f(dst.into(), Some(y.into())); } StartsWithConst(dst, x, _) => f(dst.into(), Some(x.into())), // NB: this assumes that regexes that have been constant-folded are not tainted by // user-input. That is certainly true today, but any kind of dynamic simplification or // inlining could change that. MatchConst(dst, x, _) | IsMatchConst(dst, x, _) => f(dst.into(), Some(x.into())), IsMatch(dst, x, y) | Match(dst, x, y) | SubstrIndex(dst, x, y) => { f(dst.into(), Some(x.into())); f(dst.into(), Some(y.into())); } GSub(dst, x, y, dstin) | Sub(dst, x, y, dstin) => { f(dst.into(), Some(x.into())); f(dst.into(), Some(y.into())); f(dstin.into(), Some(x.into())); f(dstin.into(), Some(y.into())); } EscapeTSV(dst, src) | EscapeCSV(dst, src) => f(dst.into(), Some(src.into())), Substr(dst, x, y, z) => { f(dst.into(), Some(x.into())); f(dst.into(), Some(y.into())); f(dst.into(), Some(z.into())); } LTFloat(dst, x, y) | GTFloat(dst, x, y) | LTEFloat(dst, x, y) | GTEFloat(dst, x, y) | EQFloat(dst, x, y) => { f(dst.into(), Some(x.into())); f(dst.into(), Some(y.into())); } LTInt(dst, x, y) | GTInt(dst, x, y) | LTEInt(dst, x, y) | GTEInt(dst, x, y) | EQInt(dst, x, y) => { f(dst.into(), Some(x.into())); f(dst.into(), Some(y.into())); } LTStr(dst, x, y) | GTStr(dst, x, y) | LTEStr(dst, x, y) | GTEStr(dst, x, y) | EQStr(dst, x, y) => { f(dst.into(), Some(x.into())); f(dst.into(), Some(y.into())); } GetColumn(dst, _) => f(dst.into(), None), JoinTSV(dst, start, end) | JoinCSV(dst, start, end) => { f(dst.into(), Some(start.into())); f(dst.into(), Some(end.into())); } JoinColumns(dst, x, y, z) => { f(dst.into(), Some(x.into())); f(dst.into(), Some(y.into())); f(dst.into(), Some(z.into())); } ToUpperAscii(dst, src) | ToLowerAscii(dst, src) => { f(dst.into(), Some(src.into())); } ReadErr(dst, _cmd, _) => f(dst.into(), None), NextLine(dst, _cmd, _) => f(dst.into(), None), ReadErrStdin(dst) => f(dst.into(), None), NextLineStdin(dst) => f(dst.into(), None), SplitInt(dst1, src1, dst2, src2) => { f(dst1.into(), Some(src1.into())); f(dst1.into(), Some(src2.into())); let (dst2_reg, dst2_ty) = dst2.reflect(); debug_assert!(dst2_ty.is_array()); f(Key::MapVal(dst2_reg, dst2_ty), Some(src1.into())); f(Key::MapVal(dst2_reg, dst2_ty), Some(src2.into())); } SplitStr(dst1, src1, dst2, src2) => { f(dst1.into(), Some(src1.into())); f(dst1.into(), Some(src2.into())); f(dst2.into(), Some(src1.into())); f(dst2.into(), Some(src2.into())); } Sprintf { dst, fmt, args } => { f(dst.into(), Some(fmt.into())); for (reg, ty) in args.iter() { f(dst.into(), Some(Key::Reg(*reg, *ty))); } } RunCmd(dst, _) => f(dst.into(), None), Lookup { map_ty, dst, map, key, } => { // lookups are also writes to the keys f(Key::MapKey(*map, *map_ty), Some(Key::Reg(*key, map_ty.key().unwrap()))); // a null value will be inserted as a value into the map f(Key::MapVal(*map, *map_ty), None); f(Key::Reg(*dst, map_ty.val().unwrap()), Some(Key::MapVal(*map, *map_ty))) }, Len { map_ty, dst, map } => f(Key::Reg(*dst, Ty::Int), Some(Key::Reg(*map, *map_ty))), Store { map_ty, map, key, val } => { f(Key::MapKey(*map, *map_ty), Some(Key::Reg(*key, map_ty.key().unwrap()))); f(Key::MapVal(*map, *map_ty), Some(Key::Reg(*val, map_ty.val().unwrap()))); } IncInt { map_ty, map, key, dst, by } => { let (reg, ty) = by.reflect(); f(Key::MapKey(*map, *map_ty), Some(Key::Reg(*key, map_ty.key().unwrap()))); f(Key::MapVal(*map, *map_ty), Some(Key::Reg(reg, ty))); f(Key::Reg(*dst, map_ty.val().unwrap()), Some(Key::MapVal(*map, *map_ty))); } IncFloat { map_ty, map, key, dst, by } => { let (reg, ty) = by.reflect(); f(Key::MapKey(*map, *map_ty), Some(Key::Reg(*key, map_ty.key().unwrap()))); f(Key::MapVal(*map, *map_ty), Some(Key::Reg(reg, ty))); f(Key::Reg(*dst, map_ty.val().unwrap()), Some(Key::MapVal(*map, *map_ty))); } IterBegin { map_ty, dst, map } => { f(Key::Reg(*dst, map_ty.key_iter().unwrap()), Some(Key::MapKey(*map, *map_ty))) } IterGetNext{iter_ty, dst, iter} => { f(Key::Reg(*dst, iter_ty.iter().unwrap()), Some(Key::Reg(*iter, *iter_ty))); } LoadVarStr(dst, v) => f(dst.into(), Some(Key::Var(*v))), LoadVarInt(dst, v) => f(dst.into(), Some(Key::Var(*v))), StoreVarIntMap(v, reg) | LoadVarIntMap(reg, v) => { let (reg, ty) = reg.reflect(); f(Key::MapKey(reg, ty), Some(Key::VarKey(*v))); f(Key::MapVal(reg, ty), Some(Key::VarVal(*v))); f(Key::VarKey(*v), Some(Key::MapKey(reg, ty))); f(Key::VarVal(*v), Some(Key::MapVal(reg, ty))); }, StoreVarStrMap(v, reg) | LoadVarStrMap(reg, v) => { let (reg, ty) = reg.reflect(); f(Key::MapKey(reg, ty), Some(Key::VarKey(*v))); f(Key::MapVal(reg, ty), Some(Key::VarVal(*v))); f(Key::VarKey(*v), Some(Key::MapKey(reg, ty))); f(Key::VarVal(*v), Some(Key::MapVal(reg, ty))); }, StoreVarStr(v, src) => f(Key::Var(*v), Some(src.into())), StoreVarInt(v, src) => f(Key::Var(*v), Some(src.into())), LoadSlot{ty,slot,dst} => f(Key::Reg(*dst, *ty), Some(Key::Slot(u32::try_from(*slot).expect("slot too large"), *ty))), StoreSlot{ty,slot,src} => f(Key::Slot(u32::try_from(*slot).expect("slot too large"), *ty), Some(Key::Reg(*src, *ty))), Delete{..} | Clear {..} | UpdateUsedFields() | SetFI(..) | PrintAll{..} | Contains{..} // 0 or 1 | IterHasNext{..} | JmpIf(..) | Jmp(_) | Push(..) | Pop(..) // We consume high-level instructions, so calls and returns are handled by visit_hl // above | Call(_) | Ret | Printf { .. } | Close(_) | NextLineStdinFused() | NextFile() | SetColumn(_, _) | AllocMap(_, _) | Exit(_) => {} } } }
#![feature(proc_macro_hygiene, decl_macro)] #![allow(unused)] extern crate openssl; #[macro_use] extern crate rocket; #[macro_use] extern crate rocket_contrib; use std::path::PathBuf; use clap::{App, Arg}; use rocket::config::Environment; use rocket::http::ContentType; use rocket::logger::LoggingLevel; use rocket::Config; use rocket::Request; use rocket::Rocket; use jsa::http; fn rocket(address: &str, port: u16) -> rocket::Rocket { let mut cfg = Config::build(Environment::Production) .address(address) .port(port) .secret_key("JFANSeDrbcxXueohPvvcEal0+Fh6bwtQ++6v1wAQDm8=") .finalize() .unwrap(); cfg.set_log_level(LoggingLevel::Off); let r = rocket::custom(cfg); http::mount_routes(r) } fn main() { let args = [ Arg::with_name("data-dir") .short("d") .takes_value(true) .default_value("./data"), Arg::with_name("port") .short("p") .takes_value(true) .default_value("8302"), Arg::with_name("print").takes_value(false), ]; let matches = App::new("jsa").args(&args).get_matches(); let data = matches.value_of("data-dir").unwrap(); let debug = matches.is_present("print"); let _port = matches.value_of("port").unwrap(); let port: u16 = _port.trim().parse().unwrap(); let addr: String = "0.0.0.0:".to_string() + _port; jsa::init(data, debug); println!("[ Jsa][ Serve]: serve on port {}", _port); rocket("0.0.0.0", port).launch(); }
// Day 9 use std::error::Error; use std::fs; use std::process; fn main() { let input_filename = "input.txt"; if let Err(e) = run(input_filename) { println!("Application error: {}", e); process::exit(1); } } fn run(filename: &str) -> Result<(), Box<dyn Error>> { // Read the input file let contents = fs::read_to_string(filename)?; let asteroid_map: Vec<&str> = contents.trim().split("\n").collect(); // Parse into a binary matrix let mut asteroid_matrix: Vec<Vec<u8>> = Vec::new(); for line in asteroid_map { let row: Vec<u8> = line.chars().map(|c| parse_char(c)).collect(); asteroid_matrix.push(row); } // Run through asteroid positions. For each position, work out // how many asteroids can be seen // Run through the nearest asteroids by euclidean distance first. // Put a mask on the asteroid position array that zeros every blocked position let asteroid_matrix = asteroid_matrix; // immutable let mut max_number_of_seen_asteroids = 0; let mut best_i = 0; let mut best_j = 0; for (i, row) in asteroid_matrix.iter().enumerate() { for (j, value) in row.iter().enumerate() { if *value == 1 { let number_of_seen_asteroids = get_visible_asteroids(asteroid_matrix.clone(), i, j); if number_of_seen_asteroids > max_number_of_seen_asteroids { max_number_of_seen_asteroids = number_of_seen_asteroids; best_i = i; best_j = j; } } } } println!( "Top asteroid is at {}, {} and sees {} asteroids", best_i, best_j, max_number_of_seen_asteroids ); // Part 2. We deploy a laser at the best_i, best_j co-ordinates. // It starts pointing vertically, then rotates clockwise vaporising any asteroids it can see. // What is the 200th asteroid to be vaporised? // Algo: // - Get the visible asteroids. Remove them in order. // - Calculate the newly visible asteroids. Remove them. // - Repeat. vaporise_asteroids(asteroid_matrix.clone(), best_i, best_j); Ok(()) } fn vaporise_asteroids(mut asteroid_matrix: Vec<Vec<u8>>, laser_i: usize, laser_j: usize) -> () { while count_nonzero(&asteroid_matrix) > 1 { // Get the matrix of visible asteroids. let visible_asteroid_indices = get_visible_asteroid_indices(asteroid_matrix.clone(), laser_i, laser_j); // sort these visible asteroid indices according to the angle between them and the laser. let visible_asteroid_indices = sort_indices_by_angle(visible_asteroid_indices, laser_i, laser_j); for index_array in visible_asteroid_indices { asteroid_matrix[index_array[0]][index_array[1]] = 0; } } // Get the } fn sort_indices_by_angle(asteroid_indices: Vec<[usize;2]>, laser_i: usize, laser_j: usize) -> Vec<[usize;2]> { // For each [i,j] pair, get the angle between vertical and the [i,j] pair from the laser position. // Once we have these angles, sort according to them and return a sorted array. let mut angles: Vec<f32> = Vec::new(); for index in &asteroid_indices { let relative_i: f32 = (laser_i as i32 - index[0] as i32) as f32; let relative_j: f32 = (laser_j as i32 - index[1] as i32) as f32; // Whats the orientation of this vector? // tan theta = -rel_i/rel_j. Tan monotonic so just store -rel_i/rel_j let angle:f32 = -relative_i/relative_j; angles.push(angle); } // Sort according to angle. asteroid_indices } fn gcd(m: i8, n: i8) -> i8 { if m == 0 { n.abs() } else { gcd(n % m, m) } } fn get_visible_asteroids( mut asteroid_matrix: Vec<Vec<u8>>, asteroid_i: usize, asteroid_j: usize, ) -> u32 { /* Spiral out from position asteroid_x, asteroid_y. If we spot an asteroid, Then zero out all the blocked positions (by repeating the relative offset until we reach the edge) Iterate over rows, from row asteroid_i, asteroid_i+1, ... N then asteroid_i-1, asteroid_i-2, .. 0 */ // Check there is an asteroid at the specified position. assert_eq!(asteroid_matrix[asteroid_i][asteroid_j], 1); let n = asteroid_matrix.len(); let m = asteroid_matrix[0].len(); for i in get_indices(asteroid_i, n) { for j in get_indices(asteroid_j, m) { if i == asteroid_i && j == asteroid_j { continue; } if asteroid_matrix[i][j] == 1 { // Then calculate the offset between this asteroid and asteroid_i, asteroid_j. // Set all blocked positions to zero. hide_blocked_asteroids(&mut asteroid_matrix, asteroid_i, asteroid_j, i, j); } } } // Now we should have gotten rid of all asteroids that can't be seen from (asteroid_i, asteroid_j). // So just count the non-zero elements of the asteroid matrix (minus 1, for the asteroid itself) count_nonzero(&asteroid_matrix) - 1 } fn get_visible_asteroid_indices( mut asteroid_matrix: Vec<Vec<u8>>, asteroid_i: usize, asteroid_j: usize, ) -> Vec<[usize; 2]> { /* Spiral out from position asteroid_x, asteroid_y. If we spot an asteroid, Then zero out all the blocked positions (by repeating the relative offset until we reach the edge) Iterate over rows, from row asteroid_i, asteroid_i+1, ... N then asteroid_i-1, asteroid_i-2, .. 0 */ assert_eq!(asteroid_matrix[asteroid_i][asteroid_j], 1); let n = asteroid_matrix.len(); let m = asteroid_matrix[0].len(); for i in get_indices(asteroid_i, n) { for j in get_indices(asteroid_j, m) { if i == asteroid_i && j == asteroid_j { continue; } if asteroid_matrix[i][j] == 1 { // Then calculate the offset between this asteroid and asteroid_i, asteroid_j. // Set all blocked positions to zero. hide_blocked_asteroids(&mut asteroid_matrix, asteroid_i, asteroid_j, i, j); } } } // Now we should have gotten rid of all asteroids that can't be seen from (asteroid_i, asteroid_j). // So just get the indices of the non-zero elements let mut non_zero_indices: Vec<[usize; 2]> = Vec::new(); for (i, row) in asteroid_matrix.iter().enumerate() { for (j, value) in row.iter().enumerate() { if i == asteroid_i && j == asteroid_j { continue } if *value == 1 { non_zero_indices.push([i, j]) } } } non_zero_indices } fn count_nonzero(asteroid_matrix: &Vec<Vec<u8>>) -> u32 { let mut nonzero = 0; for row in asteroid_matrix.iter() { for value in row.iter() { if *value != 0 { nonzero += 1; } } } nonzero } fn hide_blocked_asteroids( asteroid_matrix: &mut Vec<Vec<u8>>, asteroid_i: usize, asteroid_j: usize, i: usize, j: usize, ) -> () { // If the asteroid is on the same row or column, zero the remaining row and column. // Needs guard rails to stop accessing elements <0 or >m let n = asteroid_matrix.len(); let m = asteroid_matrix[0].len(); if asteroid_i == i { if j > asteroid_j && j < m { for blocked_j in j + 1..m { asteroid_matrix[i][blocked_j] = 0; } } else if j > 0 { for blocked_j in 0..j - 1 { asteroid_matrix[i][blocked_j] = 0; } } } else if asteroid_j == j { if i > asteroid_i && i < n { for blocked_i in i + 1..n { asteroid_matrix[blocked_i][j] = 0; } } else if i > 0 { for blocked_i in 0..i - 1 { asteroid_matrix[blocked_i][j] = 0; } } } // Otherwise, zero the positions at a repeat of the offset. // If the offsets have a common factor, then simplify them. // E.g. if the offset is (3,3) then everything (1,1) from there is blocked. let mut offset_i: i8 = i as i8 - asteroid_i as i8; let mut offset_j: i8 = j as i8 - asteroid_j as i8; let gcd = gcd(offset_i.abs(), offset_j.abs()); offset_i /= gcd; offset_j /= gcd; // While within the limits of the asteroid matrix, zero things out let mut blocked_i: i8 = i as i8 + offset_i; let mut blocked_j: i8 = j as i8 + offset_j; while blocked_i >= 0 && blocked_i < n as i8 && blocked_j >= 0 && blocked_j < m as i8 { asteroid_matrix[blocked_i as usize][blocked_j as usize] = 0; blocked_i += offset_i; blocked_j += offset_j; } } fn get_indices(index: usize, limit: usize) -> Vec<usize> { let front_indices: Vec<usize> = (index..limit).collect(); let mut back_indices: Vec<usize> = (0..index).collect(); back_indices.reverse(); [front_indices, back_indices].concat() } fn parse_char(c: char) -> u8 { let hash: char = "#".chars().next().unwrap(); let dot: char = ".".chars().next().unwrap(); if c == hash { 1 } else if c == dot { 0 } else { panic!("Unexpected char!") } }
extern crate startuppong; use startuppong::Account; fn main() { let account = Account::from_env().unwrap(); let player_res = startuppong::get_players(&account).unwrap(); let players = player_res.players(); println!("{:?}", players); }
//! This benchmark defines some test benchmarks that exercise various parts of cargo-criterion. use criterion::{ criterion_group, criterion_main, AxisScale, BenchmarkId, Criterion, PlotConfiguration, SamplingMode, Throughput, }; use std::thread::sleep; use std::time::Duration; fn special_characters(c: &mut Criterion) { let mut group = c.benchmark_group("\"*group/\""); group.bench_function("\"*benchmark/\" '", |b| b.iter(|| 1 + 1)); group.finish(); } fn sampling_mode_tests(c: &mut Criterion) { let mut group = c.benchmark_group("sampling_mode"); group.sampling_mode(SamplingMode::Auto); group.bench_function("Auto (short)", |bencher| { bencher.iter(|| sleep(Duration::from_millis(0))) }); group.bench_function("Auto (long)", |bencher| { bencher.iter(|| sleep(Duration::from_millis(10))) }); group.sampling_mode(SamplingMode::Linear); group.bench_function("Linear", |bencher| { bencher.iter(|| sleep(Duration::from_millis(0))) }); group.sampling_mode(SamplingMode::Flat); group.bench_function("Flat", |bencher| { bencher.iter(|| sleep(Duration::from_millis(10))) }); group.finish(); } const SIZE: usize = 1024; fn throughput_tests(c: &mut Criterion) { let mut group = c.benchmark_group("throughput"); group.throughput(Throughput::Bytes(SIZE as u64)); group.bench_function("Bytes", |bencher| { bencher.iter(|| (0..SIZE).map(|i| i as u8).collect::<Vec<_>>()) }); group.throughput(Throughput::Elements(SIZE as u64)); group.bench_function("Elem", |bencher| { bencher.iter(|| (0..SIZE).map(|i| i as u64).collect::<Vec<_>>()) }); group.finish(); } fn log_scale_tests(c: &mut Criterion) { let plot_config = PlotConfiguration::default().summary_scale(AxisScale::Logarithmic); let mut group = c.benchmark_group("log_scale"); group.plot_config(plot_config); for time in &[1, 100, 10000] { group.bench_with_input( BenchmarkId::new("sleep (micros)", time), time, |bencher, input| bencher.iter(|| sleep(Duration::from_micros(*input))), ); } group.finish() } fn linear_scale_tests(c: &mut Criterion) { let plot_config = PlotConfiguration::default().summary_scale(AxisScale::Linear); let mut group = c.benchmark_group("linear_scale"); group.plot_config(plot_config); for time in &[1, 2, 3] { group.bench_with_input( BenchmarkId::new("sleep (millis)", time), time, |bencher, input| bencher.iter(|| sleep(Duration::from_millis(*input))), ); } group.finish() } // These benchmarks are used for testing cargo-criterion, so to make the tests faster we configure // them to run quickly. This is not recommended for real benchmarks. criterion_group! { name = benches; config = Criterion::default() .warm_up_time(Duration::from_millis(250)) .measurement_time(Duration::from_millis(500)) .nresamples(2000); targets = special_characters, sampling_mode_tests, throughput_tests, log_scale_tests, linear_scale_tests } criterion_main!(benches);
use std::cell::RefCell; use crate::virtual_filesystem_core::graph::{Node, NodePointer, Edge, Graph}; pub type Name = String; pub type Data = String; pub type FileNode = Node<FileType>; pub type FileNodePointer = NodePointer<FileType>; #[derive(Debug, PartialEq)] pub enum FileType { Directory { name: Name, }, File { name: Name, data: Data, } } pub trait FileObject { fn name(&self) -> &Name; } impl FileObject for FileType { fn name(&self) -> &Name { match self { FileType::Directory{ name } => { name }, FileType::File{ name, data: _ } => { name }, } } } impl FileNode { pub fn create_directory(name: Name, edge: Edge<FileType>) -> FileNode { Node( FileType::Directory { name: name, }, edge, ) } pub fn create_file(name: Name, data: Data, edge: Edge<FileType>) -> FileNode { Node( FileType::File { name: name, data: data, }, edge, ) } pub fn to_pointer(self) -> FileNodePointer { FileNodePointer::new(RefCell::new(self)) } } impl Graph for FileNode { type NodeType = FileType; fn connect(&mut self, node: FileNodePointer) { self.1.push(node.clone()) } } #[cfg(test)] mod tests_file_object { use crate::virtual_filesystem_core::filesystem::{FileType, FileObject}; #[test] fn test_name() { let directory = FileType::Directory{ name: "directory".to_string() }; assert_eq!(directory.name(), "directory"); let file = FileType::File{ name: "file".to_string(), data: "data".to_string() }; assert_eq!(file.name(), "file"); } } #[cfg(test)] mod tests_file_node { use std::rc::Rc; use std::cell::RefCell; use crate::virtual_filesystem_core::graph::{Node, Edge}; use crate::virtual_filesystem_core::filesystem::{FileNode, FileType}; #[test] fn test_create() { let directory = FileNode::create_directory("directory".to_string(), Edge::new()); assert_eq!(directory, Node( FileType::Directory{ name: "directory".to_string() }, Edge::new(), )); let file = FileNode::create_file("file".to_string(), "data".to_string(), Edge::new()); assert_eq!(file, Node( FileType::File{ name: "file".to_string(), data: "data".to_string() }, Edge::new(), ) ); let pointer_directory = directory.to_pointer(); assert_eq!(pointer_directory, Rc::new( RefCell::new( Node( FileType::Directory{ name: "directory".to_string() }, Edge::new(), ) ) ) ); let pointer_file = file.to_pointer(); assert_eq!(pointer_file, Rc::new( RefCell::new( Node( FileType::File{ name: "file".to_string(), data: "data".to_string() }, Edge::new(), ) ) ) ); } } #[cfg(test)] mod tests_graph { use crate::virtual_filesystem_core::graph::{Node, Edge}; use crate::virtual_filesystem_core::filesystem::{FileNode, FileType}; #[test] fn test_edge() { let node1 = Node( FileType::Directory{ name: "node1".to_string() }, Edge::new(), ); assert_eq!(node1.1, Edge::new()); let node2 = Node( FileType::Directory{ name: "node2".to_string() }, vec![], ); assert_eq!(node2.1, vec![]); let node3 = Node( FileType::Directory{ name: "node3".to_string() }, vec![ FileNode::create_directory("sub node".to_string(), vec![]).to_pointer() ], ); assert_eq!(node3.1, vec![ FileNode::create_directory("sub node".to_string(), vec![]).to_pointer() ] ); } }
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. //! Utilities for random number generation //! //! This release is a compatibility wrapper around `rand` version 0.4. Please //! upgrade. #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png", html_favicon_url = "https://www.rust-lang.org/favicon.ico", html_root_url = "https://docs.rs/rand/0.3")] #![deny(missing_debug_implementations)] #![cfg_attr(feature = "i128_support", feature(i128_type))] extern crate rand as rand4; pub use rand4::OsRng; pub use rand4::{IsaacRng, Isaac64Rng}; pub use rand4::ChaChaRng; pub mod distributions; pub use rand4::{isaac, chacha, reseeding, os, read}; mod rand_impls; pub use rand4::Rng; pub use rand4::Rand; pub use rand4::SeedableRng; pub use rand4::{Generator, AsciiGenerator}; pub use rand4::XorShiftRng; pub use rand4::{Open01, Closed01}; pub use rand4::StdRng; pub use rand4::{weak_rng, ThreadRng, thread_rng, random}; #[allow(deprecated)] pub use rand4::sample; #[allow(deprecated)] #[cfg(test)] mod test { use super::{Rng, thread_rng, random, SeedableRng, StdRng, sample, weak_rng}; use std::iter::repeat; pub struct MyRng<R> { inner: R } impl<R: Rng> Rng for MyRng<R> { fn next_u32(&mut self) -> u32 { fn next<T: Rng>(t: &mut T) -> u32 { t.next_u32() } next(&mut self.inner) } } pub fn rng() -> MyRng<::ThreadRng> { MyRng { inner: ::thread_rng() } } struct ConstRng { i: u64 } impl Rng for ConstRng { fn next_u32(&mut self) -> u32 { self.i as u32 } fn next_u64(&mut self) -> u64 { self.i } // no fill_bytes on purpose } pub fn iter_eq<I, J>(i: I, j: J) -> bool where I: IntoIterator, J: IntoIterator<Item=I::Item>, I::Item: Eq { // make sure the iterators have equal length let mut i = i.into_iter(); let mut j = j.into_iter(); loop { match (i.next(), j.next()) { (Some(ref ei), Some(ref ej)) if ei == ej => { } (None, None) => return true, _ => return false, } } } #[test] fn test_fill_bytes_default() { let mut r = ConstRng { i: 0x11_22_33_44_55_66_77_88 }; // check every remainder mod 8, both in small and big vectors. let lengths = [0, 1, 2, 3, 4, 5, 6, 7, 80, 81, 82, 83, 84, 85, 86, 87]; for &n in lengths.iter() { let mut v = repeat(0u8).take(n).collect::<Vec<_>>(); r.fill_bytes(&mut v); // use this to get nicer error messages. for (i, &byte) in v.iter().enumerate() { if byte == 0 { panic!("byte {} of {} is zero", i, n) } } } } #[test] fn test_gen_range() { let mut r = thread_rng(); for _ in 0..1000 { let a = r.gen_range(-3, 42); assert!(a >= -3 && a < 42); assert_eq!(r.gen_range(0, 1), 0); assert_eq!(r.gen_range(-12, -11), -12); } for _ in 0..1000 { let a = r.gen_range(10, 42); assert!(a >= 10 && a < 42); assert_eq!(r.gen_range(0, 1), 0); assert_eq!(r.gen_range(3_000_000, 3_000_001), 3_000_000); } } #[test] #[should_panic] fn test_gen_range_panic_int() { let mut r = thread_rng(); r.gen_range(5, -2); } #[test] #[should_panic] fn test_gen_range_panic_usize() { let mut r = thread_rng(); r.gen_range(5, 2); } #[test] fn test_gen_weighted_bool() { let mut r = thread_rng(); assert_eq!(r.gen_weighted_bool(0), true); assert_eq!(r.gen_weighted_bool(1), true); } #[test] fn test_gen_ascii_str() { let mut r = thread_rng(); assert_eq!(r.gen_ascii_chars().take(0).count(), 0); assert_eq!(r.gen_ascii_chars().take(10).count(), 10); assert_eq!(r.gen_ascii_chars().take(16).count(), 16); } #[test] fn test_gen_vec() { let mut r = thread_rng(); assert_eq!(r.gen_iter::<u8>().take(0).count(), 0); assert_eq!(r.gen_iter::<u8>().take(10).count(), 10); assert_eq!(r.gen_iter::<f64>().take(16).count(), 16); } #[test] fn test_choose() { let mut r = thread_rng(); assert_eq!(r.choose(&[1, 1, 1]).map(|&x|x), Some(1)); let v: &[isize] = &[]; assert_eq!(r.choose(v), None); } #[test] fn test_shuffle() { let mut r = thread_rng(); let empty: &mut [isize] = &mut []; r.shuffle(empty); let mut one = [1]; r.shuffle(&mut one); let b: &[_] = &[1]; assert_eq!(one, b); let mut two = [1, 2]; r.shuffle(&mut two); assert!(two == [1, 2] || two == [2, 1]); let mut x = [1, 1, 1]; r.shuffle(&mut x); let b: &[_] = &[1, 1, 1]; assert_eq!(x, b); } #[test] fn test_thread_rng() { let mut r = thread_rng(); r.gen::<i32>(); let mut v = [1, 1, 1]; r.shuffle(&mut v); let b: &[_] = &[1, 1, 1]; assert_eq!(v, b); assert_eq!(r.gen_range(0, 1), 0); } #[test] fn test_rng_trait_object() { let mut rng = thread_rng(); { let mut r = &mut rng as &mut Rng; r.next_u32(); (&mut r).gen::<i32>(); let mut v = [1, 1, 1]; (&mut r).shuffle(&mut v); let b: &[_] = &[1, 1, 1]; assert_eq!(v, b); assert_eq!((&mut r).gen_range(0, 1), 0); } { let mut r = Box::new(rng) as Box<Rng>; r.next_u32(); r.gen::<i32>(); let mut v = [1, 1, 1]; r.shuffle(&mut v); let b: &[_] = &[1, 1, 1]; assert_eq!(v, b); assert_eq!(r.gen_range(0, 1), 0); } } #[test] fn test_random() { // not sure how to test this aside from just getting some values let _n : usize = random(); let _f : f32 = random(); let _o : Option<Option<i8>> = random(); let _many : ((), (usize, isize, Option<(u32, (bool,))>), (u8, i8, u16, i16, u32, i32, u64, i64), (f32, (f64, (f64,)))) = random(); } #[test] fn test_sample() { let min_val = 1; let max_val = 100; let mut r = thread_rng(); let vals = (min_val..max_val).collect::<Vec<i32>>(); let small_sample = sample(&mut r, vals.iter(), 5); let large_sample = sample(&mut r, vals.iter(), vals.len() + 5); assert_eq!(small_sample.len(), 5); assert_eq!(large_sample.len(), vals.len()); assert!(small_sample.iter().all(|e| { **e >= min_val && **e <= max_val })); } #[test] fn test_std_rng_seeded() { let s = thread_rng().gen_iter::<usize>().take(256).collect::<Vec<usize>>(); let mut ra: StdRng = SeedableRng::from_seed(&s[..]); let mut rb: StdRng = SeedableRng::from_seed(&s[..]); assert!(iter_eq(ra.gen_ascii_chars().take(100), rb.gen_ascii_chars().take(100))); } #[test] fn test_std_rng_reseed() { let s = thread_rng().gen_iter::<usize>().take(256).collect::<Vec<usize>>(); let mut r: StdRng = SeedableRng::from_seed(&s[..]); let string1 = r.gen_ascii_chars().take(100).collect::<String>(); r.reseed(&s); let string2 = r.gen_ascii_chars().take(100).collect::<String>(); assert_eq!(string1, string2); } #[test] fn test_weak_rng() { let s = weak_rng().gen_iter::<usize>().take(256).collect::<Vec<usize>>(); let mut ra: StdRng = SeedableRng::from_seed(&s[..]); let mut rb: StdRng = SeedableRng::from_seed(&s[..]); assert!(iter_eq(ra.gen_ascii_chars().take(100), rb.gen_ascii_chars().take(100))); } }
//- // Copyright 2017, 2018 The proptest developers // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. //! Arbitrary implementations for `std::io`. use std::io::*; use std::io::ErrorKind::*; #[cfg(test)] use crate::std_facade::Vec; use crate::std_facade::String; use crate::strategy::*; use crate::strategy::statics::static_map; use crate::arbitrary::*; // TODO: IntoInnerError // Consider: std::io::Initializer macro_rules! buffer { ($type: ident, $bound: path) => { arbitrary!( [A: Arbitrary + $bound] $type<A>, SMapped<(A, Option<u16>), Self>, A::Parameters; args => static_map( arbitrary_with(product_pack![args, Default::default()]), |(inner, cap)| { if let Some(cap) = cap { $type::with_capacity(cap as usize, inner) } else { $type::new(inner) } } ) ); lift1!([$bound] $type<A>; base => (base, any::<Option<u16>>()).prop_map(|(inner, cap)| { if let Some(cap) = cap { $type::with_capacity(cap as usize, inner) } else { $type::new(inner) } }) ); }; } buffer!(BufReader, Read); buffer!(BufWriter, Write); buffer!(LineWriter, Write); arbitrary!( [A: Read + Arbitrary, B: Read + Arbitrary] Chain<A, B>, SMapped<(A, B), Self>, product_type![A::Parameters, B::Parameters]; args => static_map(arbitrary_with(args), |(a, b)| a.chain(b)) ); wrap_ctor!(Cursor); lazy_just!( Empty, empty ; Sink, sink ; Stderr, stderr ; Stdin, stdin ; Stdout, stdout ); wrap_ctor!([BufRead] Lines, BufRead::lines); arbitrary!(Repeat, SMapped<u8, Self>; static_map(any::<u8>(), repeat)); arbitrary!( [A: BufRead + Arbitrary] Split<A>, SMapped<(A, u8), Self>, A::Parameters; args => static_map( arbitrary_with(product_pack![args, Default::default()]), |(a, b)| a.split(b) ) ); lift1!(['static + BufRead] Split<A>; base => (base, any::<u8>()).prop_map(|(a, b)| a.split(b))); arbitrary!( [A: Read + Arbitrary] Take<A>, SMapped<(A, u64), Self>, A::Parameters; args => static_map( arbitrary_with(product_pack![args, Default::default()]), |(a, b)| a.take(b) ) ); lift1!(['static + Read] Take<A>; base => (base, any::<u64>()).prop_map(|(a, b)| a.take(b))); arbitrary!(ErrorKind, Union<Just<Self>>; Union::new( [ NotFound , PermissionDenied , ConnectionRefused , ConnectionReset , ConnectionAborted , NotConnected , AddrInUse , AddrNotAvailable , BrokenPipe , AlreadyExists , WouldBlock , InvalidInput , InvalidData , TimedOut , WriteZero , Interrupted , Other , UnexpectedEof // TODO: watch this type for variant-additions. ].into_iter().cloned().map(Just)) ); arbitrary!( SeekFrom, TupleUnion<( W<SMapped<u64, SeekFrom>>, W<SMapped<i64, SeekFrom>>, W<SMapped<i64, SeekFrom>>, )>; prop_oneof![ static_map(any::<u64>(), SeekFrom::Start), static_map(any::<i64>(), SeekFrom::End), static_map(any::<i64>(), SeekFrom::Current) ] ); arbitrary!(Error, SMapped<(ErrorKind, Option<String>), Self>; static_map(arbitrary(), |(k, os)| if let Some(s) = os { Error::new(k, s) } else { k.into() } ) ); #[cfg(test)] mod test { no_panic_test!( buf_reader => BufReader<Repeat>, buf_writer => BufWriter<Sink>, line_writer => LineWriter<Sink>, chain => Chain<Empty, BufReader<Repeat>>, cursor => Cursor<Empty>, empty => Empty, sink => Sink, stderr => Stderr, stdin => Stdin, stdout => Stdout, lines => Lines<Empty>, repeat => Repeat, split => Split<Cursor<Vec<u8>>>, take => Take<Repeat>, error_kind => ErrorKind, seek_from => SeekFrom, error => Error ); }
fn partitions(mut cards: [usize; 10], subtotal: usize) -> i32 { let mut m=0; let mut total; // Hit for i in 0..10 { if cards[i]>0 { total = subtotal+i+1; if total < 21 { // Stand m += 1; // Hit again cards[i] -= 1; m += partitions(cards, total); cards[i] += 1; } else if total==21 { // Stand; hit again is an automatic bust m += 1; } } } return m; } fn main() { let mut deck: [usize; 10] = [4; 10]; deck[9] = 16; let mut d=0; for i in 0..10 { // Dealer showing deck[i] -= 1; let mut p = 0; for j in 0..10 { deck[j] -= 1; let n = partitions(deck, j+1); deck[j] += 1; p += n; } println!("Dealer showing {}, partitions = {}",i,p); d += p; deck[i] += 1; } println!("Total partitions = {}",d); }
#[doc = "Reader of register RESBEHAVCTL"] pub type R = crate::R<u32, super::RESBEHAVCTL>; #[doc = "Writer for register RESBEHAVCTL"] pub type W = crate::W<u32, super::RESBEHAVCTL>; #[doc = "Register RESBEHAVCTL `reset()`'s with value 0"] impl crate::ResetValue for super::RESBEHAVCTL { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "External RST Pin Operation\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum EXTRES_A { #[doc = "2: External RST assertion issues a system reset. The application starts within 10 us"] SYSRST = 2, #[doc = "3: External RST assertion issues a simulated POR sequence. Application starts less than 500 us after deassertion (Default)"] POR = 3, } impl From<EXTRES_A> for u8 { #[inline(always)] fn from(variant: EXTRES_A) -> Self { variant as _ } } #[doc = "Reader of field `EXTRES`"] pub type EXTRES_R = crate::R<u8, EXTRES_A>; impl EXTRES_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, EXTRES_A> { use crate::Variant::*; match self.bits { 2 => Val(EXTRES_A::SYSRST), 3 => Val(EXTRES_A::POR), i => Res(i), } } #[doc = "Checks if the value of the field is `SYSRST`"] #[inline(always)] pub fn is_sysrst(&self) -> bool { *self == EXTRES_A::SYSRST } #[doc = "Checks if the value of the field is `POR`"] #[inline(always)] pub fn is_por(&self) -> bool { *self == EXTRES_A::POR } } #[doc = "Write proxy for field `EXTRES`"] pub struct EXTRES_W<'a> { w: &'a mut W, } impl<'a> EXTRES_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: EXTRES_A) -> &'a mut W { unsafe { self.bits(variant.into()) } } #[doc = "External RST assertion issues a system reset. The application starts within 10 us"] #[inline(always)] pub fn sysrst(self) -> &'a mut W { self.variant(EXTRES_A::SYSRST) } #[doc = "External RST assertion issues a simulated POR sequence. Application starts less than 500 us after deassertion (Default)"] #[inline(always)] pub fn por(self) -> &'a mut W { self.variant(EXTRES_A::POR) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !0x03) | ((value as u32) & 0x03); self.w } } #[doc = "BOR Reset operation\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum BOR_A { #[doc = "2: Brown Out Reset issues system reset. The application starts within 10 us"] SYSRST = 2, #[doc = "3: Brown Out Reset issues a simulated POR sequence. The application starts less than 500 us after deassertion (Default)"] POR = 3, } impl From<BOR_A> for u8 { #[inline(always)] fn from(variant: BOR_A) -> Self { variant as _ } } #[doc = "Reader of field `BOR`"] pub type BOR_R = crate::R<u8, BOR_A>; impl BOR_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, BOR_A> { use crate::Variant::*; match self.bits { 2 => Val(BOR_A::SYSRST), 3 => Val(BOR_A::POR), i => Res(i), } } #[doc = "Checks if the value of the field is `SYSRST`"] #[inline(always)] pub fn is_sysrst(&self) -> bool { *self == BOR_A::SYSRST } #[doc = "Checks if the value of the field is `POR`"] #[inline(always)] pub fn is_por(&self) -> bool { *self == BOR_A::POR } } #[doc = "Write proxy for field `BOR`"] pub struct BOR_W<'a> { w: &'a mut W, } impl<'a> BOR_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: BOR_A) -> &'a mut W { unsafe { self.bits(variant.into()) } } #[doc = "Brown Out Reset issues system reset. The application starts within 10 us"] #[inline(always)] pub fn sysrst(self) -> &'a mut W { self.variant(BOR_A::SYSRST) } #[doc = "Brown Out Reset issues a simulated POR sequence. The application starts less than 500 us after deassertion (Default)"] #[inline(always)] pub fn por(self) -> &'a mut W { self.variant(BOR_A::POR) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x03 << 2)) | (((value as u32) & 0x03) << 2); self.w } } #[doc = "Watchdog 0 Reset Operation\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum WDOG0_A { #[doc = "2: Watchdog 0 issues a system reset. The application starts within 10 us"] SYSRST = 2, #[doc = "3: Watchdog 0 issues a simulated POR sequence. Application starts less than 500 us after deassertion (Default)"] POR = 3, } impl From<WDOG0_A> for u8 { #[inline(always)] fn from(variant: WDOG0_A) -> Self { variant as _ } } #[doc = "Reader of field `WDOG0`"] pub type WDOG0_R = crate::R<u8, WDOG0_A>; impl WDOG0_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, WDOG0_A> { use crate::Variant::*; match self.bits { 2 => Val(WDOG0_A::SYSRST), 3 => Val(WDOG0_A::POR), i => Res(i), } } #[doc = "Checks if the value of the field is `SYSRST`"] #[inline(always)] pub fn is_sysrst(&self) -> bool { *self == WDOG0_A::SYSRST } #[doc = "Checks if the value of the field is `POR`"] #[inline(always)] pub fn is_por(&self) -> bool { *self == WDOG0_A::POR } } #[doc = "Write proxy for field `WDOG0`"] pub struct WDOG0_W<'a> { w: &'a mut W, } impl<'a> WDOG0_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: WDOG0_A) -> &'a mut W { unsafe { self.bits(variant.into()) } } #[doc = "Watchdog 0 issues a system reset. The application starts within 10 us"] #[inline(always)] pub fn sysrst(self) -> &'a mut W { self.variant(WDOG0_A::SYSRST) } #[doc = "Watchdog 0 issues a simulated POR sequence. Application starts less than 500 us after deassertion (Default)"] #[inline(always)] pub fn por(self) -> &'a mut W { self.variant(WDOG0_A::POR) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x03 << 4)) | (((value as u32) & 0x03) << 4); self.w } } #[doc = "Watchdog 1 Reset Operation\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum WDOG1_A { #[doc = "2: Watchdog 1 issues a system reset. The application starts within 10 us"] SYSRST = 2, #[doc = "3: Watchdog 1 issues a simulated POR sequence. Application starts less than 500 us after deassertion (Default)"] POR = 3, } impl From<WDOG1_A> for u8 { #[inline(always)] fn from(variant: WDOG1_A) -> Self { variant as _ } } #[doc = "Reader of field `WDOG1`"] pub type WDOG1_R = crate::R<u8, WDOG1_A>; impl WDOG1_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, WDOG1_A> { use crate::Variant::*; match self.bits { 2 => Val(WDOG1_A::SYSRST), 3 => Val(WDOG1_A::POR), i => Res(i), } } #[doc = "Checks if the value of the field is `SYSRST`"] #[inline(always)] pub fn is_sysrst(&self) -> bool { *self == WDOG1_A::SYSRST } #[doc = "Checks if the value of the field is `POR`"] #[inline(always)] pub fn is_por(&self) -> bool { *self == WDOG1_A::POR } } #[doc = "Write proxy for field `WDOG1`"] pub struct WDOG1_W<'a> { w: &'a mut W, } impl<'a> WDOG1_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: WDOG1_A) -> &'a mut W { unsafe { self.bits(variant.into()) } } #[doc = "Watchdog 1 issues a system reset. The application starts within 10 us"] #[inline(always)] pub fn sysrst(self) -> &'a mut W { self.variant(WDOG1_A::SYSRST) } #[doc = "Watchdog 1 issues a simulated POR sequence. Application starts less than 500 us after deassertion (Default)"] #[inline(always)] pub fn por(self) -> &'a mut W { self.variant(WDOG1_A::POR) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x03 << 6)) | (((value as u32) & 0x03) << 6); self.w } } impl R { #[doc = "Bits 0:1 - External RST Pin Operation"] #[inline(always)] pub fn extres(&self) -> EXTRES_R { EXTRES_R::new((self.bits & 0x03) as u8) } #[doc = "Bits 2:3 - BOR Reset operation"] #[inline(always)] pub fn bor(&self) -> BOR_R { BOR_R::new(((self.bits >> 2) & 0x03) as u8) } #[doc = "Bits 4:5 - Watchdog 0 Reset Operation"] #[inline(always)] pub fn wdog0(&self) -> WDOG0_R { WDOG0_R::new(((self.bits >> 4) & 0x03) as u8) } #[doc = "Bits 6:7 - Watchdog 1 Reset Operation"] #[inline(always)] pub fn wdog1(&self) -> WDOG1_R { WDOG1_R::new(((self.bits >> 6) & 0x03) as u8) } } impl W { #[doc = "Bits 0:1 - External RST Pin Operation"] #[inline(always)] pub fn extres(&mut self) -> EXTRES_W { EXTRES_W { w: self } } #[doc = "Bits 2:3 - BOR Reset operation"] #[inline(always)] pub fn bor(&mut self) -> BOR_W { BOR_W { w: self } } #[doc = "Bits 4:5 - Watchdog 0 Reset Operation"] #[inline(always)] pub fn wdog0(&mut self) -> WDOG0_W { WDOG0_W { w: self } } #[doc = "Bits 6:7 - Watchdog 1 Reset Operation"] #[inline(always)] pub fn wdog1(&mut self) -> WDOG1_W { WDOG1_W { w: self } } }
// Copyright (c) 2021 Quark Container Authors / 2018 The gVisor Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. use alloc::sync::Arc; use alloc::string::ToString; use spin::Mutex; use alloc::collections::btree_map::BTreeMap; use super::super::super::super::super::qlib::common::*; use super::super::super::super::super::qlib::linux_def::*; use super::super::super::super::super::qlib::auth::*; use super::super::super::super::super::task::*; use super::super::super::super::attr::*; use super::super::super::super::file::*; use super::super::super::super::flags::*; use super::super::super::super::dirent::*; use super::super::super::super::mount::*; use super::super::super::super::inode::*; use super::super::super::super::ramfs::dir::*; use super::super::super::dir_proc::*; use super::super::super::inode::*; use super::mmap_min_addr::*; use super::overcommit::*; // ProcSysDirNode represents a /proc/sys directory. pub struct ProcSysDirNode { } impl DirDataNode for ProcSysDirNode { fn Lookup(&self, d: &Dir, task: &Task, dir: &Inode, name: &str) -> Result<Dirent> { return d.Lookup(task, dir, name); } fn GetFile(&self, d: &Dir, task: &Task, dir: &Inode, dirent: &Dirent, flags: FileFlags) -> Result<File> { return d.GetFile(task, dir, dirent, flags) } } pub fn NewVm(task: &Task, msrc: &Arc<Mutex<MountSource>>) -> Inode { let mut contents = BTreeMap::new(); contents.insert("mmap_min_addr".to_string(), NewMinAddrData(task, msrc)); contents.insert("overcommit_memory".to_string(), NewOvercommit(task, msrc)); let taskDir = DirNode { dir: Dir::New(task, contents, &ROOT_OWNER, &FilePermissions::FromMode(FileMode(0o0555))), data: ProcSysDirNode { } }; return NewProcInode(&Arc::new(taskDir), msrc, InodeType::SpecialDirectory, None) }
use std::fmt::Debug; use std::ops::{Deref, DerefMut}; use std::path::Path; use mpq::Archive; use crate::binary_reader::BinaryReader; use crate::binary_writer::BinaryWriter; use crate::MpqError::IoError; #[derive(Debug, PartialOrd, PartialEq, Clone, Copy)] pub enum GameVersion { RoC, TFT, Reforged, } impl GameVersion { pub fn is_tft(&self) -> bool{ match self{ GameVersion::RoC => false, GameVersion::TFT | GameVersion::Reforged => true } } pub fn is_roc(&self) -> bool{ match self{ GameVersion::RoC => true, GameVersion::TFT | GameVersion::Reforged => false } } pub fn is_remaster(&self) -> bool{ match self{ GameVersion::Reforged => true, _ => false } } } impl Default for GameVersion{ fn default() -> Self { GameVersion::TFT } } pub mod binary_reader; pub mod binary_writer; pub mod blp; pub trait BinaryConverter{ fn read(reader: &mut BinaryReader) -> Self; fn write(&self, writer: &mut BinaryWriter); } pub trait BinaryConverterVersion{ fn read_version(reader: &mut BinaryReader, game_version: &GameVersion) -> Self; fn write_version(&self, writer: &mut BinaryWriter, game_version: &GameVersion) -> Self; } #[cfg(test)] mod tests { #[test] fn it_works() { assert_eq!(2 + 2, 4); } } pub trait GameDataVersionDescriptorT: Debug {} #[derive(Debug)] pub struct GameDataRocDescriptor; impl GameDataVersionDescriptorT for GameDataRocDescriptor {} #[derive(Debug)] pub struct GameDataTftDescriptor; impl GameDataVersionDescriptorT for GameDataTftDescriptor {} #[derive(Debug)] pub struct GameDataReforgedDescriptor; impl GameDataVersionDescriptorT for GameDataReforgedDescriptor {} #[derive(Debug)] pub enum MpqError { IoError(std::io::Error), NotMapArchive, } // #[derive(Deref, DerefMut)] pub struct MapArchive(Archive); impl MapArchive { pub fn open(path: String) -> Result<Self, MpqError> { let path = Path::new(&path); let ext = path.extension().expect(&format!("No extension for path '{:?}'",path)); if ext == "w3m" || ext == "w3x" { let archive = Archive::open(path); archive.map(|a| Self(a)).map_err(IoError) } else { Err(MpqError::NotMapArchive) } } } impl Deref for MapArchive { type Target = Archive; fn deref(&self) -> &Self::Target { &self.0 } } impl DerefMut for MapArchive { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 } } pub struct GameMpq(Archive); impl GameMpq { pub fn open(path: String) -> Result<Self, std::io::Error> { let archive = Archive::open(path); archive.map(|a| Self(a)) } } impl Deref for GameMpq { type Target = Archive; fn deref(&self) -> &Self::Target { &self.0 } } impl DerefMut for GameMpq { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 } }