]> git.proxmox.com Git - rustc.git/blob - vendor/windows/src/Windows/Win32/System/WinRT/AllJoyn/impl.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / vendor / windows / src / Windows / Win32 / System / WinRT / AllJoyn / impl.rs
1 #[doc = "*Required features: `\"Win32_System_WinRT_AllJoyn\"`, `\"implement\"`*"]
2 pub trait IWindowsDevicesAllJoynBusAttachmentFactoryInterop_Impl: Sized {
3 fn CreateFromWin32Handle(&self, win32handle: u64, enableaboutdata: u8, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()>;
4 }
5 impl ::windows::core::RuntimeName for IWindowsDevicesAllJoynBusAttachmentFactoryInterop {}
6 impl IWindowsDevicesAllJoynBusAttachmentFactoryInterop_Vtbl {
7 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWindowsDevicesAllJoynBusAttachmentFactoryInterop_Impl, const OFFSET: isize>() -> IWindowsDevicesAllJoynBusAttachmentFactoryInterop_Vtbl {
8 unsafe extern "system" fn CreateFromWin32Handle<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWindowsDevicesAllJoynBusAttachmentFactoryInterop_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, win32handle: u64, enableaboutdata: u8, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
9 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
10 let this = (*this).get_impl();
11 this.CreateFromWin32Handle(::core::mem::transmute_copy(&win32handle), ::core::mem::transmute_copy(&enableaboutdata), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppv)).into()
12 }
13 Self {
14 base__: ::windows::core::IInspectable_Vtbl::new::<Identity, IWindowsDevicesAllJoynBusAttachmentFactoryInterop, OFFSET>(),
15 CreateFromWin32Handle: CreateFromWin32Handle::<Identity, Impl, OFFSET>,
16 }
17 }
18 pub fn matches(iid: &windows::core::GUID) -> bool {
19 iid == &<IWindowsDevicesAllJoynBusAttachmentFactoryInterop as ::windows::core::ComInterface>::IID
20 }
21 }
22 #[doc = "*Required features: `\"Win32_System_WinRT_AllJoyn\"`, `\"implement\"`*"]
23 pub trait IWindowsDevicesAllJoynBusAttachmentInterop_Impl: Sized {
24 fn Win32Handle(&self) -> ::windows::core::Result<u64>;
25 }
26 impl ::windows::core::RuntimeName for IWindowsDevicesAllJoynBusAttachmentInterop {}
27 impl IWindowsDevicesAllJoynBusAttachmentInterop_Vtbl {
28 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWindowsDevicesAllJoynBusAttachmentInterop_Impl, const OFFSET: isize>() -> IWindowsDevicesAllJoynBusAttachmentInterop_Vtbl {
29 unsafe extern "system" fn Win32Handle<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWindowsDevicesAllJoynBusAttachmentInterop_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: *mut u64) -> ::windows::core::HRESULT {
30 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
31 let this = (*this).get_impl();
32 match this.Win32Handle() {
33 ::core::result::Result::Ok(ok__) => {
34 ::core::ptr::write(value, ::core::mem::transmute(ok__));
35 ::windows::core::HRESULT(0)
36 }
37 ::core::result::Result::Err(err) => err.into(),
38 }
39 }
40 Self {
41 base__: ::windows::core::IInspectable_Vtbl::new::<Identity, IWindowsDevicesAllJoynBusAttachmentInterop, OFFSET>(),
42 Win32Handle: Win32Handle::<Identity, Impl, OFFSET>,
43 }
44 }
45 pub fn matches(iid: &windows::core::GUID) -> bool {
46 iid == &<IWindowsDevicesAllJoynBusAttachmentInterop as ::windows::core::ComInterface>::IID
47 }
48 }
49 #[doc = "*Required features: `\"Win32_System_WinRT_AllJoyn\"`, `\"implement\"`*"]
50 pub trait IWindowsDevicesAllJoynBusObjectFactoryInterop_Impl: Sized {
51 fn CreateFromWin32Handle(&self, win32handle: u64, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()>;
52 }
53 impl ::windows::core::RuntimeName for IWindowsDevicesAllJoynBusObjectFactoryInterop {}
54 impl IWindowsDevicesAllJoynBusObjectFactoryInterop_Vtbl {
55 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWindowsDevicesAllJoynBusObjectFactoryInterop_Impl, const OFFSET: isize>() -> IWindowsDevicesAllJoynBusObjectFactoryInterop_Vtbl {
56 unsafe extern "system" fn CreateFromWin32Handle<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWindowsDevicesAllJoynBusObjectFactoryInterop_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, win32handle: u64, riid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
57 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
58 let this = (*this).get_impl();
59 this.CreateFromWin32Handle(::core::mem::transmute_copy(&win32handle), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppv)).into()
60 }
61 Self {
62 base__: ::windows::core::IInspectable_Vtbl::new::<Identity, IWindowsDevicesAllJoynBusObjectFactoryInterop, OFFSET>(),
63 CreateFromWin32Handle: CreateFromWin32Handle::<Identity, Impl, OFFSET>,
64 }
65 }
66 pub fn matches(iid: &windows::core::GUID) -> bool {
67 iid == &<IWindowsDevicesAllJoynBusObjectFactoryInterop as ::windows::core::ComInterface>::IID
68 }
69 }
70 #[doc = "*Required features: `\"Win32_System_WinRT_AllJoyn\"`, `\"implement\"`*"]
71 pub trait IWindowsDevicesAllJoynBusObjectInterop_Impl: Sized {
72 fn AddPropertyGetHandler(&self, context: *const ::core::ffi::c_void, interfacename: &::windows::core::HSTRING, callback: isize) -> ::windows::core::Result<()>;
73 fn AddPropertySetHandler(&self, context: *const ::core::ffi::c_void, interfacename: &::windows::core::HSTRING, callback: isize) -> ::windows::core::Result<()>;
74 fn Win32Handle(&self) -> ::windows::core::Result<u64>;
75 }
76 impl ::windows::core::RuntimeName for IWindowsDevicesAllJoynBusObjectInterop {}
77 impl IWindowsDevicesAllJoynBusObjectInterop_Vtbl {
78 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWindowsDevicesAllJoynBusObjectInterop_Impl, const OFFSET: isize>() -> IWindowsDevicesAllJoynBusObjectInterop_Vtbl {
79 unsafe extern "system" fn AddPropertyGetHandler<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWindowsDevicesAllJoynBusObjectInterop_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, context: *const ::core::ffi::c_void, interfacename: ::std::mem::MaybeUninit<::windows::core::HSTRING>, callback: isize) -> ::windows::core::HRESULT {
80 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
81 let this = (*this).get_impl();
82 this.AddPropertyGetHandler(::core::mem::transmute_copy(&context), ::core::mem::transmute(&interfacename), ::core::mem::transmute_copy(&callback)).into()
83 }
84 unsafe extern "system" fn AddPropertySetHandler<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWindowsDevicesAllJoynBusObjectInterop_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, context: *const ::core::ffi::c_void, interfacename: ::std::mem::MaybeUninit<::windows::core::HSTRING>, callback: isize) -> ::windows::core::HRESULT {
85 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
86 let this = (*this).get_impl();
87 this.AddPropertySetHandler(::core::mem::transmute_copy(&context), ::core::mem::transmute(&interfacename), ::core::mem::transmute_copy(&callback)).into()
88 }
89 unsafe extern "system" fn Win32Handle<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWindowsDevicesAllJoynBusObjectInterop_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: *mut u64) -> ::windows::core::HRESULT {
90 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
91 let this = (*this).get_impl();
92 match this.Win32Handle() {
93 ::core::result::Result::Ok(ok__) => {
94 ::core::ptr::write(value, ::core::mem::transmute(ok__));
95 ::windows::core::HRESULT(0)
96 }
97 ::core::result::Result::Err(err) => err.into(),
98 }
99 }
100 Self {
101 base__: ::windows::core::IInspectable_Vtbl::new::<Identity, IWindowsDevicesAllJoynBusObjectInterop, OFFSET>(),
102 AddPropertyGetHandler: AddPropertyGetHandler::<Identity, Impl, OFFSET>,
103 AddPropertySetHandler: AddPropertySetHandler::<Identity, Impl, OFFSET>,
104 Win32Handle: Win32Handle::<Identity, Impl, OFFSET>,
105 }
106 }
107 pub fn matches(iid: &windows::core::GUID) -> bool {
108 iid == &<IWindowsDevicesAllJoynBusObjectInterop as ::windows::core::ComInterface>::IID
109 }
110 }