]> git.proxmox.com Git - rustc.git/blame - vendor/windows/src/Windows/Win32/System/ParentalControls/impl.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / vendor / windows / src / Windows / Win32 / System / ParentalControls / impl.rs
CommitLineData
353b0b11
FG
1#[doc = "*Required features: `\"Win32_System_ParentalControls\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
2#[cfg(feature = "Win32_Foundation")]
3pub trait IWPCGamesSettings_Impl: Sized + IWPCSettings_Impl {
4 fn IsBlocked(&self, guidappid: &::windows::core::GUID) -> ::windows::core::Result<u32>;
5}
6#[cfg(feature = "Win32_Foundation")]
7impl ::windows::core::RuntimeName for IWPCGamesSettings {}
8#[cfg(feature = "Win32_Foundation")]
9impl IWPCGamesSettings_Vtbl {
10 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCGamesSettings_Impl, const OFFSET: isize>() -> IWPCGamesSettings_Vtbl {
11 unsafe extern "system" fn IsBlocked<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCGamesSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, guidappid: ::windows::core::GUID, pdwreasons: *mut u32) -> ::windows::core::HRESULT {
12 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
13 let this = (*this).get_impl();
14 match this.IsBlocked(::core::mem::transmute(&guidappid)) {
15 ::core::result::Result::Ok(ok__) => {
16 ::core::ptr::write(pdwreasons, ::core::mem::transmute(ok__));
17 ::windows::core::HRESULT(0)
18 }
19 ::core::result::Result::Err(err) => err.into(),
20 }
21 }
22 Self { base__: IWPCSettings_Vtbl::new::<Identity, Impl, OFFSET>(), IsBlocked: IsBlocked::<Identity, Impl, OFFSET> }
23 }
24 pub fn matches(iid: &windows::core::GUID) -> bool {
25 iid == &<IWPCGamesSettings as ::windows::core::ComInterface>::IID || iid == &<IWPCSettings as ::windows::core::ComInterface>::IID
26 }
27}
28#[doc = "*Required features: `\"Win32_System_ParentalControls\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
29#[cfg(feature = "Win32_Foundation")]
30pub trait IWPCProviderConfig_Impl: Sized {
31 fn GetUserSummary(&self, bstrsid: &::windows::core::BSTR) -> ::windows::core::Result<::windows::core::BSTR>;
32 fn Configure(&self, hwnd: super::super::Foundation::HWND, bstrsid: &::windows::core::BSTR) -> ::windows::core::Result<()>;
33 fn RequestOverride(&self, hwnd: super::super::Foundation::HWND, bstrpath: &::windows::core::BSTR, dwflags: WPCFLAG_RESTRICTION) -> ::windows::core::Result<()>;
34}
35#[cfg(feature = "Win32_Foundation")]
36impl ::windows::core::RuntimeName for IWPCProviderConfig {}
37#[cfg(feature = "Win32_Foundation")]
38impl IWPCProviderConfig_Vtbl {
39 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCProviderConfig_Impl, const OFFSET: isize>() -> IWPCProviderConfig_Vtbl {
40 unsafe extern "system" fn GetUserSummary<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCProviderConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrsid: ::std::mem::MaybeUninit<::windows::core::BSTR>, pbstrusersummary: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
41 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
42 let this = (*this).get_impl();
43 match this.GetUserSummary(::core::mem::transmute(&bstrsid)) {
44 ::core::result::Result::Ok(ok__) => {
45 ::core::ptr::write(pbstrusersummary, ::core::mem::transmute(ok__));
46 ::windows::core::HRESULT(0)
47 }
48 ::core::result::Result::Err(err) => err.into(),
49 }
50 }
51 unsafe extern "system" fn Configure<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCProviderConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hwnd: super::super::Foundation::HWND, bstrsid: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
52 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
53 let this = (*this).get_impl();
54 this.Configure(::core::mem::transmute_copy(&hwnd), ::core::mem::transmute(&bstrsid)).into()
55 }
56 unsafe extern "system" fn RequestOverride<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCProviderConfig_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hwnd: super::super::Foundation::HWND, bstrpath: ::std::mem::MaybeUninit<::windows::core::BSTR>, dwflags: WPCFLAG_RESTRICTION) -> ::windows::core::HRESULT {
57 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
58 let this = (*this).get_impl();
59 this.RequestOverride(::core::mem::transmute_copy(&hwnd), ::core::mem::transmute(&bstrpath), ::core::mem::transmute_copy(&dwflags)).into()
60 }
61 Self {
62 base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
63 GetUserSummary: GetUserSummary::<Identity, Impl, OFFSET>,
64 Configure: Configure::<Identity, Impl, OFFSET>,
65 RequestOverride: RequestOverride::<Identity, Impl, OFFSET>,
66 }
67 }
68 pub fn matches(iid: &windows::core::GUID) -> bool {
69 iid == &<IWPCProviderConfig as ::windows::core::ComInterface>::IID
70 }
71}
72#[doc = "*Required features: `\"Win32_System_ParentalControls\"`, `\"implement\"`*"]
73pub trait IWPCProviderState_Impl: Sized {
74 fn Enable(&self) -> ::windows::core::Result<()>;
75 fn Disable(&self) -> ::windows::core::Result<()>;
76}
77impl ::windows::core::RuntimeName for IWPCProviderState {}
78impl IWPCProviderState_Vtbl {
79 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCProviderState_Impl, const OFFSET: isize>() -> IWPCProviderState_Vtbl {
80 unsafe extern "system" fn Enable<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCProviderState_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
81 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
82 let this = (*this).get_impl();
83 this.Enable().into()
84 }
85 unsafe extern "system" fn Disable<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCProviderState_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
86 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
87 let this = (*this).get_impl();
88 this.Disable().into()
89 }
90 Self {
91 base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
92 Enable: Enable::<Identity, Impl, OFFSET>,
93 Disable: Disable::<Identity, Impl, OFFSET>,
94 }
95 }
96 pub fn matches(iid: &windows::core::GUID) -> bool {
97 iid == &<IWPCProviderState as ::windows::core::ComInterface>::IID
98 }
99}
100#[doc = "*Required features: `\"Win32_System_ParentalControls\"`, `\"implement\"`*"]
101pub trait IWPCProviderSupport_Impl: Sized {
102 fn GetCurrent(&self) -> ::windows::core::Result<::windows::core::GUID>;
103}
104impl ::windows::core::RuntimeName for IWPCProviderSupport {}
105impl IWPCProviderSupport_Vtbl {
106 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCProviderSupport_Impl, const OFFSET: isize>() -> IWPCProviderSupport_Vtbl {
107 unsafe extern "system" fn GetCurrent<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCProviderSupport_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pguidprovider: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
108 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
109 let this = (*this).get_impl();
110 match this.GetCurrent() {
111 ::core::result::Result::Ok(ok__) => {
112 ::core::ptr::write(pguidprovider, ::core::mem::transmute(ok__));
113 ::windows::core::HRESULT(0)
114 }
115 ::core::result::Result::Err(err) => err.into(),
116 }
117 }
118 Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetCurrent: GetCurrent::<Identity, Impl, OFFSET> }
119 }
120 pub fn matches(iid: &windows::core::GUID) -> bool {
121 iid == &<IWPCProviderSupport as ::windows::core::ComInterface>::IID
122 }
123}
124#[doc = "*Required features: `\"Win32_System_ParentalControls\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
125#[cfg(feature = "Win32_Foundation")]
126pub trait IWPCSettings_Impl: Sized {
127 fn IsLoggingRequired(&self) -> ::windows::core::Result<super::super::Foundation::BOOL>;
128 fn GetLastSettingsChangeTime(&self) -> ::windows::core::Result<super::super::Foundation::SYSTEMTIME>;
129 fn GetRestrictions(&self) -> ::windows::core::Result<WPCFLAG_RESTRICTION>;
130}
131#[cfg(feature = "Win32_Foundation")]
132impl ::windows::core::RuntimeName for IWPCSettings {}
133#[cfg(feature = "Win32_Foundation")]
134impl IWPCSettings_Vtbl {
135 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCSettings_Impl, const OFFSET: isize>() -> IWPCSettings_Vtbl {
136 unsafe extern "system" fn IsLoggingRequired<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pfrequired: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
137 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
138 let this = (*this).get_impl();
139 match this.IsLoggingRequired() {
140 ::core::result::Result::Ok(ok__) => {
141 ::core::ptr::write(pfrequired, ::core::mem::transmute(ok__));
142 ::windows::core::HRESULT(0)
143 }
144 ::core::result::Result::Err(err) => err.into(),
145 }
146 }
147 unsafe extern "system" fn GetLastSettingsChangeTime<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ptime: *mut super::super::Foundation::SYSTEMTIME) -> ::windows::core::HRESULT {
148 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
149 let this = (*this).get_impl();
150 match this.GetLastSettingsChangeTime() {
151 ::core::result::Result::Ok(ok__) => {
152 ::core::ptr::write(ptime, ::core::mem::transmute(ok__));
153 ::windows::core::HRESULT(0)
154 }
155 ::core::result::Result::Err(err) => err.into(),
156 }
157 }
158 unsafe extern "system" fn GetRestrictions<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwrestrictions: *mut WPCFLAG_RESTRICTION) -> ::windows::core::HRESULT {
159 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
160 let this = (*this).get_impl();
161 match this.GetRestrictions() {
162 ::core::result::Result::Ok(ok__) => {
163 ::core::ptr::write(pdwrestrictions, ::core::mem::transmute(ok__));
164 ::windows::core::HRESULT(0)
165 }
166 ::core::result::Result::Err(err) => err.into(),
167 }
168 }
169 Self {
170 base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
171 IsLoggingRequired: IsLoggingRequired::<Identity, Impl, OFFSET>,
172 GetLastSettingsChangeTime: GetLastSettingsChangeTime::<Identity, Impl, OFFSET>,
173 GetRestrictions: GetRestrictions::<Identity, Impl, OFFSET>,
174 }
175 }
176 pub fn matches(iid: &windows::core::GUID) -> bool {
177 iid == &<IWPCSettings as ::windows::core::ComInterface>::IID
178 }
179}
180#[doc = "*Required features: `\"Win32_System_ParentalControls\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
181#[cfg(feature = "Win32_Foundation")]
182pub trait IWPCWebSettings_Impl: Sized + IWPCSettings_Impl {
183 fn GetSettings(&self) -> ::windows::core::Result<WPCFLAG_WEB_SETTING>;
184 fn RequestURLOverride(&self, hwnd: super::super::Foundation::HWND, pcszurl: &::windows::core::PCWSTR, curls: u32, ppcszsuburls: *const ::windows::core::PCWSTR) -> ::windows::core::Result<super::super::Foundation::BOOL>;
185}
186#[cfg(feature = "Win32_Foundation")]
187impl ::windows::core::RuntimeName for IWPCWebSettings {}
188#[cfg(feature = "Win32_Foundation")]
189impl IWPCWebSettings_Vtbl {
190 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCWebSettings_Impl, const OFFSET: isize>() -> IWPCWebSettings_Vtbl {
191 unsafe extern "system" fn GetSettings<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCWebSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwsettings: *mut WPCFLAG_WEB_SETTING) -> ::windows::core::HRESULT {
192 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
193 let this = (*this).get_impl();
194 match this.GetSettings() {
195 ::core::result::Result::Ok(ok__) => {
196 ::core::ptr::write(pdwsettings, ::core::mem::transmute(ok__));
197 ::windows::core::HRESULT(0)
198 }
199 ::core::result::Result::Err(err) => err.into(),
200 }
201 }
202 unsafe extern "system" fn RequestURLOverride<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWPCWebSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hwnd: super::super::Foundation::HWND, pcszurl: ::windows::core::PCWSTR, curls: u32, ppcszsuburls: *const ::windows::core::PCWSTR, pfchanged: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT {
203 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
204 let this = (*this).get_impl();
205 match this.RequestURLOverride(::core::mem::transmute_copy(&hwnd), ::core::mem::transmute(&pcszurl), ::core::mem::transmute_copy(&curls), ::core::mem::transmute_copy(&ppcszsuburls)) {
206 ::core::result::Result::Ok(ok__) => {
207 ::core::ptr::write(pfchanged, ::core::mem::transmute(ok__));
208 ::windows::core::HRESULT(0)
209 }
210 ::core::result::Result::Err(err) => err.into(),
211 }
212 }
213 Self {
214 base__: IWPCSettings_Vtbl::new::<Identity, Impl, OFFSET>(),
215 GetSettings: GetSettings::<Identity, Impl, OFFSET>,
216 RequestURLOverride: RequestURLOverride::<Identity, Impl, OFFSET>,
217 }
218 }
219 pub fn matches(iid: &windows::core::GUID) -> bool {
220 iid == &<IWPCWebSettings as ::windows::core::ComInterface>::IID || iid == &<IWPCSettings as ::windows::core::ComInterface>::IID
221 }
222}
223#[doc = "*Required features: `\"Win32_System_ParentalControls\"`, `\"implement\"`*"]
224pub trait IWindowsParentalControls_Impl: Sized + IWindowsParentalControlsCore_Impl {
225 fn GetGamesSettings(&self, pcszsid: &::windows::core::PCWSTR) -> ::windows::core::Result<IWPCGamesSettings>;
226}
227impl ::windows::core::RuntimeName for IWindowsParentalControls {}
228impl IWindowsParentalControls_Vtbl {
229 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWindowsParentalControls_Impl, const OFFSET: isize>() -> IWindowsParentalControls_Vtbl {
230 unsafe extern "system" fn GetGamesSettings<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWindowsParentalControls_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcszsid: ::windows::core::PCWSTR, ppsettings: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
231 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
232 let this = (*this).get_impl();
233 match this.GetGamesSettings(::core::mem::transmute(&pcszsid)) {
234 ::core::result::Result::Ok(ok__) => {
235 ::core::ptr::write(ppsettings, ::core::mem::transmute(ok__));
236 ::windows::core::HRESULT(0)
237 }
238 ::core::result::Result::Err(err) => err.into(),
239 }
240 }
241 Self { base__: IWindowsParentalControlsCore_Vtbl::new::<Identity, Impl, OFFSET>(), GetGamesSettings: GetGamesSettings::<Identity, Impl, OFFSET> }
242 }
243 pub fn matches(iid: &windows::core::GUID) -> bool {
244 iid == &<IWindowsParentalControls as ::windows::core::ComInterface>::IID || iid == &<IWindowsParentalControlsCore as ::windows::core::ComInterface>::IID
245 }
246}
247#[doc = "*Required features: `\"Win32_System_ParentalControls\"`, `\"implement\"`*"]
248pub trait IWindowsParentalControlsCore_Impl: Sized {
249 fn GetVisibility(&self) -> ::windows::core::Result<WPCFLAG_VISIBILITY>;
250 fn GetUserSettings(&self, pcszsid: &::windows::core::PCWSTR) -> ::windows::core::Result<IWPCSettings>;
251 fn GetWebSettings(&self, pcszsid: &::windows::core::PCWSTR) -> ::windows::core::Result<IWPCWebSettings>;
252 fn GetWebFilterInfo(&self, pguidid: *mut ::windows::core::GUID, ppszname: *mut ::windows::core::PWSTR) -> ::windows::core::Result<()>;
253}
254impl ::windows::core::RuntimeName for IWindowsParentalControlsCore {}
255impl IWindowsParentalControlsCore_Vtbl {
256 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWindowsParentalControlsCore_Impl, const OFFSET: isize>() -> IWindowsParentalControlsCore_Vtbl {
257 unsafe extern "system" fn GetVisibility<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWindowsParentalControlsCore_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pevisibility: *mut WPCFLAG_VISIBILITY) -> ::windows::core::HRESULT {
258 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
259 let this = (*this).get_impl();
260 match this.GetVisibility() {
261 ::core::result::Result::Ok(ok__) => {
262 ::core::ptr::write(pevisibility, ::core::mem::transmute(ok__));
263 ::windows::core::HRESULT(0)
264 }
265 ::core::result::Result::Err(err) => err.into(),
266 }
267 }
268 unsafe extern "system" fn GetUserSettings<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWindowsParentalControlsCore_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcszsid: ::windows::core::PCWSTR, ppsettings: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
269 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
270 let this = (*this).get_impl();
271 match this.GetUserSettings(::core::mem::transmute(&pcszsid)) {
272 ::core::result::Result::Ok(ok__) => {
273 ::core::ptr::write(ppsettings, ::core::mem::transmute(ok__));
274 ::windows::core::HRESULT(0)
275 }
276 ::core::result::Result::Err(err) => err.into(),
277 }
278 }
279 unsafe extern "system" fn GetWebSettings<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWindowsParentalControlsCore_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcszsid: ::windows::core::PCWSTR, ppsettings: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
280 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
281 let this = (*this).get_impl();
282 match this.GetWebSettings(::core::mem::transmute(&pcszsid)) {
283 ::core::result::Result::Ok(ok__) => {
284 ::core::ptr::write(ppsettings, ::core::mem::transmute(ok__));
285 ::windows::core::HRESULT(0)
286 }
287 ::core::result::Result::Err(err) => err.into(),
288 }
289 }
290 unsafe extern "system" fn GetWebFilterInfo<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IWindowsParentalControlsCore_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pguidid: *mut ::windows::core::GUID, ppszname: *mut ::windows::core::PWSTR) -> ::windows::core::HRESULT {
291 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
292 let this = (*this).get_impl();
293 this.GetWebFilterInfo(::core::mem::transmute_copy(&pguidid), ::core::mem::transmute_copy(&ppszname)).into()
294 }
295 Self {
296 base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
297 GetVisibility: GetVisibility::<Identity, Impl, OFFSET>,
298 GetUserSettings: GetUserSettings::<Identity, Impl, OFFSET>,
299 GetWebSettings: GetWebSettings::<Identity, Impl, OFFSET>,
300 GetWebFilterInfo: GetWebFilterInfo::<Identity, Impl, OFFSET>,
301 }
302 }
303 pub fn matches(iid: &windows::core::GUID) -> bool {
304 iid == &<IWindowsParentalControlsCore as ::windows::core::ComInterface>::IID
305 }
306}