]> git.proxmox.com Git - rustc.git/blob - vendor/windows/src/Windows/Win32/Storage/IndexServer/impl.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / vendor / windows / src / Windows / Win32 / Storage / IndexServer / impl.rs
1 #[doc = "*Required features: `\"Win32_Storage_IndexServer\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
2 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
3 pub trait IFilter_Impl: Sized {
4 fn Init(&self, grfflags: u32, cattributes: u32, aattributes: *const FULLPROPSPEC, pflags: *mut u32) -> i32;
5 fn GetChunk(&self, pstat: *mut STAT_CHUNK) -> i32;
6 fn GetText(&self, pcwcbuffer: *mut u32, awcbuffer: ::windows::core::PWSTR) -> i32;
7 fn GetValue(&self, pppropvalue: *mut *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> i32;
8 fn BindRegion(&self, origpos: &FILTERREGION, riid: *const ::windows::core::GUID, ppunk: *mut *mut ::core::ffi::c_void) -> i32;
9 }
10 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
11 impl ::windows::core::RuntimeName for IFilter {}
12 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage"))]
13 impl IFilter_Vtbl {
14 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFilter_Impl, const OFFSET: isize>() -> IFilter_Vtbl {
15 unsafe extern "system" fn Init<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFilter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, grfflags: u32, cattributes: u32, aattributes: *const FULLPROPSPEC, pflags: *mut u32) -> i32 {
16 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
17 let this = (*this).get_impl();
18 this.Init(::core::mem::transmute_copy(&grfflags), ::core::mem::transmute_copy(&cattributes), ::core::mem::transmute_copy(&aattributes), ::core::mem::transmute_copy(&pflags))
19 }
20 unsafe extern "system" fn GetChunk<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFilter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pstat: *mut STAT_CHUNK) -> i32 {
21 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
22 let this = (*this).get_impl();
23 this.GetChunk(::core::mem::transmute_copy(&pstat))
24 }
25 unsafe extern "system" fn GetText<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFilter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcwcbuffer: *mut u32, awcbuffer: ::windows::core::PWSTR) -> i32 {
26 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
27 let this = (*this).get_impl();
28 this.GetText(::core::mem::transmute_copy(&pcwcbuffer), ::core::mem::transmute_copy(&awcbuffer))
29 }
30 unsafe extern "system" fn GetValue<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFilter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pppropvalue: *mut *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> i32 {
31 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
32 let this = (*this).get_impl();
33 this.GetValue(::core::mem::transmute_copy(&pppropvalue))
34 }
35 unsafe extern "system" fn BindRegion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IFilter_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, origpos: FILTERREGION, riid: *const ::windows::core::GUID, ppunk: *mut *mut ::core::ffi::c_void) -> i32 {
36 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
37 let this = (*this).get_impl();
38 this.BindRegion(::core::mem::transmute(&origpos), ::core::mem::transmute_copy(&riid), ::core::mem::transmute_copy(&ppunk))
39 }
40 Self {
41 base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
42 Init: Init::<Identity, Impl, OFFSET>,
43 GetChunk: GetChunk::<Identity, Impl, OFFSET>,
44 GetText: GetText::<Identity, Impl, OFFSET>,
45 GetValue: GetValue::<Identity, Impl, OFFSET>,
46 BindRegion: BindRegion::<Identity, Impl, OFFSET>,
47 }
48 }
49 pub fn matches(iid: &windows::core::GUID) -> bool {
50 iid == &<IFilter as ::windows::core::ComInterface>::IID
51 }
52 }
53 #[doc = "*Required features: `\"Win32_Storage_IndexServer\"`, `\"implement\"`*"]
54 pub trait IPhraseSink_Impl: Sized {
55 fn PutSmallPhrase(&self, pwcnoun: &::windows::core::PCWSTR, cwcnoun: u32, pwcmodifier: &::windows::core::PCWSTR, cwcmodifier: u32, ulattachmenttype: u32) -> ::windows::core::Result<()>;
56 fn PutPhrase(&self, pwcphrase: &::windows::core::PCWSTR, cwcphrase: u32) -> ::windows::core::Result<()>;
57 }
58 impl ::windows::core::RuntimeName for IPhraseSink {}
59 impl IPhraseSink_Vtbl {
60 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IPhraseSink_Impl, const OFFSET: isize>() -> IPhraseSink_Vtbl {
61 unsafe extern "system" fn PutSmallPhrase<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IPhraseSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pwcnoun: ::windows::core::PCWSTR, cwcnoun: u32, pwcmodifier: ::windows::core::PCWSTR, cwcmodifier: u32, ulattachmenttype: u32) -> ::windows::core::HRESULT {
62 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
63 let this = (*this).get_impl();
64 this.PutSmallPhrase(::core::mem::transmute(&pwcnoun), ::core::mem::transmute_copy(&cwcnoun), ::core::mem::transmute(&pwcmodifier), ::core::mem::transmute_copy(&cwcmodifier), ::core::mem::transmute_copy(&ulattachmenttype)).into()
65 }
66 unsafe extern "system" fn PutPhrase<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IPhraseSink_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pwcphrase: ::windows::core::PCWSTR, cwcphrase: u32) -> ::windows::core::HRESULT {
67 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
68 let this = (*this).get_impl();
69 this.PutPhrase(::core::mem::transmute(&pwcphrase), ::core::mem::transmute_copy(&cwcphrase)).into()
70 }
71 Self {
72 base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
73 PutSmallPhrase: PutSmallPhrase::<Identity, Impl, OFFSET>,
74 PutPhrase: PutPhrase::<Identity, Impl, OFFSET>,
75 }
76 }
77 pub fn matches(iid: &windows::core::GUID) -> bool {
78 iid == &<IPhraseSink as ::windows::core::ComInterface>::IID
79 }
80 }