]> git.proxmox.com Git - rustc.git/blame - vendor/windows/src/Windows/Win32/System/EventNotificationService/impl.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / vendor / windows / src / Windows / Win32 / System / EventNotificationService / impl.rs
CommitLineData
353b0b11
FG
1#[doc = "*Required features: `\"Win32_System_EventNotificationService\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
2#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
3pub trait ISensLogon_Impl: Sized + super::Com::IDispatch_Impl {
4 fn Logon(&self, bstrusername: &::windows::core::BSTR) -> ::windows::core::Result<()>;
5 fn Logoff(&self, bstrusername: &::windows::core::BSTR) -> ::windows::core::Result<()>;
6 fn StartShell(&self, bstrusername: &::windows::core::BSTR) -> ::windows::core::Result<()>;
7 fn DisplayLock(&self, bstrusername: &::windows::core::BSTR) -> ::windows::core::Result<()>;
8 fn DisplayUnlock(&self, bstrusername: &::windows::core::BSTR) -> ::windows::core::Result<()>;
9 fn StartScreenSaver(&self, bstrusername: &::windows::core::BSTR) -> ::windows::core::Result<()>;
10 fn StopScreenSaver(&self, bstrusername: &::windows::core::BSTR) -> ::windows::core::Result<()>;
11}
12#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
13impl ::windows::core::RuntimeName for ISensLogon {}
14#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
15impl ISensLogon_Vtbl {
16 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensLogon_Impl, const OFFSET: isize>() -> ISensLogon_Vtbl {
17 unsafe extern "system" fn Logon<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensLogon_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrusername: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
18 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
19 let this = (*this).get_impl();
20 this.Logon(::core::mem::transmute(&bstrusername)).into()
21 }
22 unsafe extern "system" fn Logoff<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensLogon_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrusername: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
23 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
24 let this = (*this).get_impl();
25 this.Logoff(::core::mem::transmute(&bstrusername)).into()
26 }
27 unsafe extern "system" fn StartShell<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensLogon_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrusername: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
28 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
29 let this = (*this).get_impl();
30 this.StartShell(::core::mem::transmute(&bstrusername)).into()
31 }
32 unsafe extern "system" fn DisplayLock<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensLogon_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrusername: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
33 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
34 let this = (*this).get_impl();
35 this.DisplayLock(::core::mem::transmute(&bstrusername)).into()
36 }
37 unsafe extern "system" fn DisplayUnlock<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensLogon_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrusername: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
38 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
39 let this = (*this).get_impl();
40 this.DisplayUnlock(::core::mem::transmute(&bstrusername)).into()
41 }
42 unsafe extern "system" fn StartScreenSaver<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensLogon_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrusername: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
43 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
44 let this = (*this).get_impl();
45 this.StartScreenSaver(::core::mem::transmute(&bstrusername)).into()
46 }
47 unsafe extern "system" fn StopScreenSaver<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensLogon_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrusername: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
48 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
49 let this = (*this).get_impl();
50 this.StopScreenSaver(::core::mem::transmute(&bstrusername)).into()
51 }
52 Self {
53 base__: super::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
54 Logon: Logon::<Identity, Impl, OFFSET>,
55 Logoff: Logoff::<Identity, Impl, OFFSET>,
56 StartShell: StartShell::<Identity, Impl, OFFSET>,
57 DisplayLock: DisplayLock::<Identity, Impl, OFFSET>,
58 DisplayUnlock: DisplayUnlock::<Identity, Impl, OFFSET>,
59 StartScreenSaver: StartScreenSaver::<Identity, Impl, OFFSET>,
60 StopScreenSaver: StopScreenSaver::<Identity, Impl, OFFSET>,
61 }
62 }
63 pub fn matches(iid: &windows::core::GUID) -> bool {
64 iid == &<ISensLogon as ::windows::core::ComInterface>::IID || iid == &<super::Com::IDispatch as ::windows::core::ComInterface>::IID
65 }
66}
67#[doc = "*Required features: `\"Win32_System_EventNotificationService\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
68#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
69pub trait ISensLogon2_Impl: Sized + super::Com::IDispatch_Impl {
70 fn Logon(&self, bstrusername: &::windows::core::BSTR, dwsessionid: u32) -> ::windows::core::Result<()>;
71 fn Logoff(&self, bstrusername: &::windows::core::BSTR, dwsessionid: u32) -> ::windows::core::Result<()>;
72 fn SessionDisconnect(&self, bstrusername: &::windows::core::BSTR, dwsessionid: u32) -> ::windows::core::Result<()>;
73 fn SessionReconnect(&self, bstrusername: &::windows::core::BSTR, dwsessionid: u32) -> ::windows::core::Result<()>;
74 fn PostShell(&self, bstrusername: &::windows::core::BSTR, dwsessionid: u32) -> ::windows::core::Result<()>;
75}
76#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
77impl ::windows::core::RuntimeName for ISensLogon2 {}
78#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
79impl ISensLogon2_Vtbl {
80 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensLogon2_Impl, const OFFSET: isize>() -> ISensLogon2_Vtbl {
81 unsafe extern "system" fn Logon<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensLogon2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrusername: ::std::mem::MaybeUninit<::windows::core::BSTR>, dwsessionid: u32) -> ::windows::core::HRESULT {
82 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
83 let this = (*this).get_impl();
84 this.Logon(::core::mem::transmute(&bstrusername), ::core::mem::transmute_copy(&dwsessionid)).into()
85 }
86 unsafe extern "system" fn Logoff<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensLogon2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrusername: ::std::mem::MaybeUninit<::windows::core::BSTR>, dwsessionid: u32) -> ::windows::core::HRESULT {
87 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
88 let this = (*this).get_impl();
89 this.Logoff(::core::mem::transmute(&bstrusername), ::core::mem::transmute_copy(&dwsessionid)).into()
90 }
91 unsafe extern "system" fn SessionDisconnect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensLogon2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrusername: ::std::mem::MaybeUninit<::windows::core::BSTR>, dwsessionid: u32) -> ::windows::core::HRESULT {
92 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
93 let this = (*this).get_impl();
94 this.SessionDisconnect(::core::mem::transmute(&bstrusername), ::core::mem::transmute_copy(&dwsessionid)).into()
95 }
96 unsafe extern "system" fn SessionReconnect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensLogon2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrusername: ::std::mem::MaybeUninit<::windows::core::BSTR>, dwsessionid: u32) -> ::windows::core::HRESULT {
97 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
98 let this = (*this).get_impl();
99 this.SessionReconnect(::core::mem::transmute(&bstrusername), ::core::mem::transmute_copy(&dwsessionid)).into()
100 }
101 unsafe extern "system" fn PostShell<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensLogon2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrusername: ::std::mem::MaybeUninit<::windows::core::BSTR>, dwsessionid: u32) -> ::windows::core::HRESULT {
102 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
103 let this = (*this).get_impl();
104 this.PostShell(::core::mem::transmute(&bstrusername), ::core::mem::transmute_copy(&dwsessionid)).into()
105 }
106 Self {
107 base__: super::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
108 Logon: Logon::<Identity, Impl, OFFSET>,
109 Logoff: Logoff::<Identity, Impl, OFFSET>,
110 SessionDisconnect: SessionDisconnect::<Identity, Impl, OFFSET>,
111 SessionReconnect: SessionReconnect::<Identity, Impl, OFFSET>,
112 PostShell: PostShell::<Identity, Impl, OFFSET>,
113 }
114 }
115 pub fn matches(iid: &windows::core::GUID) -> bool {
116 iid == &<ISensLogon2 as ::windows::core::ComInterface>::IID || iid == &<super::Com::IDispatch as ::windows::core::ComInterface>::IID
117 }
118}
119#[doc = "*Required features: `\"Win32_System_EventNotificationService\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
120#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
121pub trait ISensNetwork_Impl: Sized + super::Com::IDispatch_Impl {
122 fn ConnectionMade(&self, bstrconnection: &::windows::core::BSTR, ultype: u32, lpqocinfo: *const SENS_QOCINFO) -> ::windows::core::Result<()>;
123 fn ConnectionMadeNoQOCInfo(&self, bstrconnection: &::windows::core::BSTR, ultype: u32) -> ::windows::core::Result<()>;
124 fn ConnectionLost(&self, bstrconnection: &::windows::core::BSTR, ultype: SENS_CONNECTION_TYPE) -> ::windows::core::Result<()>;
125 fn DestinationReachable(&self, bstrdestination: &::windows::core::BSTR, bstrconnection: &::windows::core::BSTR, ultype: u32, lpqocinfo: *const SENS_QOCINFO) -> ::windows::core::Result<()>;
126 fn DestinationReachableNoQOCInfo(&self, bstrdestination: &::windows::core::BSTR, bstrconnection: &::windows::core::BSTR, ultype: u32) -> ::windows::core::Result<()>;
127}
128#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
129impl ::windows::core::RuntimeName for ISensNetwork {}
130#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
131impl ISensNetwork_Vtbl {
132 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensNetwork_Impl, const OFFSET: isize>() -> ISensNetwork_Vtbl {
133 unsafe extern "system" fn ConnectionMade<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensNetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrconnection: ::std::mem::MaybeUninit<::windows::core::BSTR>, ultype: u32, lpqocinfo: *const SENS_QOCINFO) -> ::windows::core::HRESULT {
134 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
135 let this = (*this).get_impl();
136 this.ConnectionMade(::core::mem::transmute(&bstrconnection), ::core::mem::transmute_copy(&ultype), ::core::mem::transmute_copy(&lpqocinfo)).into()
137 }
138 unsafe extern "system" fn ConnectionMadeNoQOCInfo<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensNetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrconnection: ::std::mem::MaybeUninit<::windows::core::BSTR>, ultype: u32) -> ::windows::core::HRESULT {
139 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
140 let this = (*this).get_impl();
141 this.ConnectionMadeNoQOCInfo(::core::mem::transmute(&bstrconnection), ::core::mem::transmute_copy(&ultype)).into()
142 }
143 unsafe extern "system" fn ConnectionLost<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensNetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrconnection: ::std::mem::MaybeUninit<::windows::core::BSTR>, ultype: SENS_CONNECTION_TYPE) -> ::windows::core::HRESULT {
144 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
145 let this = (*this).get_impl();
146 this.ConnectionLost(::core::mem::transmute(&bstrconnection), ::core::mem::transmute_copy(&ultype)).into()
147 }
148 unsafe extern "system" fn DestinationReachable<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensNetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrdestination: ::std::mem::MaybeUninit<::windows::core::BSTR>, bstrconnection: ::std::mem::MaybeUninit<::windows::core::BSTR>, ultype: u32, lpqocinfo: *const SENS_QOCINFO) -> ::windows::core::HRESULT {
149 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
150 let this = (*this).get_impl();
151 this.DestinationReachable(::core::mem::transmute(&bstrdestination), ::core::mem::transmute(&bstrconnection), ::core::mem::transmute_copy(&ultype), ::core::mem::transmute_copy(&lpqocinfo)).into()
152 }
153 unsafe extern "system" fn DestinationReachableNoQOCInfo<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensNetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrdestination: ::std::mem::MaybeUninit<::windows::core::BSTR>, bstrconnection: ::std::mem::MaybeUninit<::windows::core::BSTR>, ultype: u32) -> ::windows::core::HRESULT {
154 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
155 let this = (*this).get_impl();
156 this.DestinationReachableNoQOCInfo(::core::mem::transmute(&bstrdestination), ::core::mem::transmute(&bstrconnection), ::core::mem::transmute_copy(&ultype)).into()
157 }
158 Self {
159 base__: super::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
160 ConnectionMade: ConnectionMade::<Identity, Impl, OFFSET>,
161 ConnectionMadeNoQOCInfo: ConnectionMadeNoQOCInfo::<Identity, Impl, OFFSET>,
162 ConnectionLost: ConnectionLost::<Identity, Impl, OFFSET>,
163 DestinationReachable: DestinationReachable::<Identity, Impl, OFFSET>,
164 DestinationReachableNoQOCInfo: DestinationReachableNoQOCInfo::<Identity, Impl, OFFSET>,
165 }
166 }
167 pub fn matches(iid: &windows::core::GUID) -> bool {
168 iid == &<ISensNetwork as ::windows::core::ComInterface>::IID || iid == &<super::Com::IDispatch as ::windows::core::ComInterface>::IID
169 }
170}
171#[doc = "*Required features: `\"Win32_System_EventNotificationService\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
172#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
173pub trait ISensOnNow_Impl: Sized + super::Com::IDispatch_Impl {
174 fn OnACPower(&self) -> ::windows::core::Result<()>;
175 fn OnBatteryPower(&self, dwbatterylifepercent: u32) -> ::windows::core::Result<()>;
176 fn BatteryLow(&self, dwbatterylifepercent: u32) -> ::windows::core::Result<()>;
177}
178#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
179impl ::windows::core::RuntimeName for ISensOnNow {}
180#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
181impl ISensOnNow_Vtbl {
182 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensOnNow_Impl, const OFFSET: isize>() -> ISensOnNow_Vtbl {
183 unsafe extern "system" fn OnACPower<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensOnNow_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
184 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
185 let this = (*this).get_impl();
186 this.OnACPower().into()
187 }
188 unsafe extern "system" fn OnBatteryPower<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensOnNow_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwbatterylifepercent: u32) -> ::windows::core::HRESULT {
189 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
190 let this = (*this).get_impl();
191 this.OnBatteryPower(::core::mem::transmute_copy(&dwbatterylifepercent)).into()
192 }
193 unsafe extern "system" fn BatteryLow<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: ISensOnNow_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dwbatterylifepercent: u32) -> ::windows::core::HRESULT {
194 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
195 let this = (*this).get_impl();
196 this.BatteryLow(::core::mem::transmute_copy(&dwbatterylifepercent)).into()
197 }
198 Self {
199 base__: super::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
200 OnACPower: OnACPower::<Identity, Impl, OFFSET>,
201 OnBatteryPower: OnBatteryPower::<Identity, Impl, OFFSET>,
202 BatteryLow: BatteryLow::<Identity, Impl, OFFSET>,
203 }
204 }
205 pub fn matches(iid: &windows::core::GUID) -> bool {
206 iid == &<ISensOnNow as ::windows::core::ComInterface>::IID || iid == &<super::Com::IDispatch as ::windows::core::ComInterface>::IID
207 }
208}