1 #![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] 2 #[repr(transparent)] 3 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 4 pub struct DnssdRegistrationResult(::windows::runtime::IInspectable); 5 impl DnssdRegistrationResult { new() -> ::windows::runtime::Result<Self>6 pub fn new() -> ::windows::runtime::Result<Self> { 7 Self::IActivationFactory(|f| f.activate_instance::<Self>()) 8 } IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R>9 fn IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R> { 10 static mut SHARED: ::windows::runtime::FactoryCache<DnssdRegistrationResult, ::windows::runtime::IActivationFactory> = ::windows::runtime::FactoryCache::new(); 11 unsafe { SHARED.call(callback) } 12 } Status(&self) -> ::windows::runtime::Result<DnssdRegistrationStatus>13 pub fn Status(&self) -> ::windows::runtime::Result<DnssdRegistrationStatus> { 14 let this = self; 15 unsafe { 16 let mut result__: DnssdRegistrationStatus = ::std::mem::zeroed(); 17 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<DnssdRegistrationStatus>(result__) 18 } 19 } IPAddress(&self) -> ::windows::runtime::Result<super::super::HostName>20 pub fn IPAddress(&self) -> ::windows::runtime::Result<super::super::HostName> { 21 let this = self; 22 unsafe { 23 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 24 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<super::super::HostName>(result__) 25 } 26 } HasInstanceNameChanged(&self) -> ::windows::runtime::Result<bool>27 pub fn HasInstanceNameChanged(&self) -> ::windows::runtime::Result<bool> { 28 let this = self; 29 unsafe { 30 let mut result__: bool = ::std::mem::zeroed(); 31 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) 32 } 33 } 34 #[cfg(feature = "Foundation")] ToString(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING>35 pub fn ToString(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 36 let this = &::windows::runtime::Interface::cast::<super::super::super::Foundation::IStringable>(self)?; 37 unsafe { 38 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 39 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 40 } 41 } 42 } 43 unsafe impl ::windows::runtime::RuntimeType for DnssdRegistrationResult { 44 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Networking.ServiceDiscovery.Dnssd.DnssdRegistrationResult;{3d786ad2-e606-5350-73ea-7e97f066162f})"); 45 } 46 unsafe impl ::windows::runtime::Interface for DnssdRegistrationResult { 47 type Vtable = IDnssdRegistrationResult_abi; 48 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1031301842, 58886, 21328, [115, 234, 126, 151, 240, 102, 22, 47]); 49 } 50 impl ::windows::runtime::RuntimeName for DnssdRegistrationResult { 51 const NAME: &'static str = "Windows.Networking.ServiceDiscovery.Dnssd.DnssdRegistrationResult"; 52 } 53 impl ::std::convert::From<DnssdRegistrationResult> for ::windows::runtime::IUnknown { from(value: DnssdRegistrationResult) -> Self54 fn from(value: DnssdRegistrationResult) -> Self { 55 unsafe { ::std::mem::transmute(value) } 56 } 57 } 58 impl ::std::convert::From<&DnssdRegistrationResult> for ::windows::runtime::IUnknown { from(value: &DnssdRegistrationResult) -> Self59 fn from(value: &DnssdRegistrationResult) -> Self { 60 ::std::convert::From::from(::std::clone::Clone::clone(value)) 61 } 62 } 63 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for DnssdRegistrationResult { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>64 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 65 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 66 } 67 } 68 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &DnssdRegistrationResult { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>69 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 70 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 71 } 72 } 73 impl ::std::convert::From<DnssdRegistrationResult> for ::windows::runtime::IInspectable { from(value: DnssdRegistrationResult) -> Self74 fn from(value: DnssdRegistrationResult) -> Self { 75 value.0 76 } 77 } 78 impl ::std::convert::From<&DnssdRegistrationResult> for ::windows::runtime::IInspectable { from(value: &DnssdRegistrationResult) -> Self79 fn from(value: &DnssdRegistrationResult) -> Self { 80 value.0.clone() 81 } 82 } 83 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for DnssdRegistrationResult { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>84 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 85 ::windows::runtime::Param::Owned(self.0) 86 } 87 } 88 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a DnssdRegistrationResult { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>89 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 90 ::windows::runtime::Param::Borrowed(&self.0) 91 } 92 } 93 #[cfg(feature = "Foundation")] 94 impl ::std::convert::TryFrom<DnssdRegistrationResult> for super::super::super::Foundation::IStringable { 95 type Error = ::windows::runtime::Error; try_from(value: DnssdRegistrationResult) -> ::windows::runtime::Result<Self>96 fn try_from(value: DnssdRegistrationResult) -> ::windows::runtime::Result<Self> { 97 ::std::convert::TryFrom::try_from(&value) 98 } 99 } 100 #[cfg(feature = "Foundation")] 101 impl ::std::convert::TryFrom<&DnssdRegistrationResult> for super::super::super::Foundation::IStringable { 102 type Error = ::windows::runtime::Error; try_from(value: &DnssdRegistrationResult) -> ::windows::runtime::Result<Self>103 fn try_from(value: &DnssdRegistrationResult) -> ::windows::runtime::Result<Self> { 104 ::windows::runtime::Interface::cast(value) 105 } 106 } 107 #[cfg(feature = "Foundation")] 108 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::IStringable> for DnssdRegistrationResult { into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IStringable>109 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IStringable> { 110 ::windows::runtime::IntoParam::into_param(&self) 111 } 112 } 113 #[cfg(feature = "Foundation")] 114 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::IStringable> for &DnssdRegistrationResult { into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IStringable>115 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IStringable> { 116 ::std::convert::TryInto::<super::super::super::Foundation::IStringable>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 117 } 118 } 119 unsafe impl ::std::marker::Send for DnssdRegistrationResult {} 120 unsafe impl ::std::marker::Sync for DnssdRegistrationResult {} 121 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)] 122 #[repr(transparent)] 123 pub struct DnssdRegistrationStatus(pub i32); 124 impl DnssdRegistrationStatus { 125 pub const Success: DnssdRegistrationStatus = DnssdRegistrationStatus(0i32); 126 pub const InvalidServiceName: DnssdRegistrationStatus = DnssdRegistrationStatus(1i32); 127 pub const ServerError: DnssdRegistrationStatus = DnssdRegistrationStatus(2i32); 128 pub const SecurityError: DnssdRegistrationStatus = DnssdRegistrationStatus(3i32); 129 } 130 impl ::std::convert::From<i32> for DnssdRegistrationStatus { from(value: i32) -> Self131 fn from(value: i32) -> Self { 132 Self(value) 133 } 134 } 135 unsafe impl ::windows::runtime::Abi for DnssdRegistrationStatus { 136 type Abi = Self; 137 type DefaultType = Self; 138 } 139 unsafe impl ::windows::runtime::RuntimeType for DnssdRegistrationStatus { 140 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"enum(Windows.Networking.ServiceDiscovery.Dnssd.DnssdRegistrationStatus;i4)"); 141 } 142 #[repr(transparent)] 143 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 144 pub struct DnssdServiceInstance(::windows::runtime::IInspectable); 145 impl DnssdServiceInstance { DnssdServiceInstanceName(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING>146 pub fn DnssdServiceInstanceName(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 147 let this = self; 148 unsafe { 149 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 150 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 151 } 152 } SetDnssdServiceInstanceName<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, value: Param0) -> ::windows::runtime::Result<()>153 pub fn SetDnssdServiceInstanceName<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(&self, value: Param0) -> ::windows::runtime::Result<()> { 154 let this = self; 155 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value.into_param().abi()).ok() } 156 } HostName(&self) -> ::windows::runtime::Result<super::super::HostName>157 pub fn HostName(&self) -> ::windows::runtime::Result<super::super::HostName> { 158 let this = self; 159 unsafe { 160 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 161 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<super::super::HostName>(result__) 162 } 163 } SetHostName<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::HostName>>(&self, value: Param0) -> ::windows::runtime::Result<()>164 pub fn SetHostName<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::HostName>>(&self, value: Param0) -> ::windows::runtime::Result<()> { 165 let this = self; 166 unsafe { (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), value.into_param().abi()).ok() } 167 } Port(&self) -> ::windows::runtime::Result<u16>168 pub fn Port(&self) -> ::windows::runtime::Result<u16> { 169 let this = self; 170 unsafe { 171 let mut result__: u16 = ::std::mem::zeroed(); 172 (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u16>(result__) 173 } 174 } SetPort(&self, value: u16) -> ::windows::runtime::Result<()>175 pub fn SetPort(&self, value: u16) -> ::windows::runtime::Result<()> { 176 let this = self; 177 unsafe { (::windows::runtime::Interface::vtable(this).11)(::std::mem::transmute_copy(this), value).ok() } 178 } Priority(&self) -> ::windows::runtime::Result<u16>179 pub fn Priority(&self) -> ::windows::runtime::Result<u16> { 180 let this = self; 181 unsafe { 182 let mut result__: u16 = ::std::mem::zeroed(); 183 (::windows::runtime::Interface::vtable(this).12)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u16>(result__) 184 } 185 } SetPriority(&self, value: u16) -> ::windows::runtime::Result<()>186 pub fn SetPriority(&self, value: u16) -> ::windows::runtime::Result<()> { 187 let this = self; 188 unsafe { (::windows::runtime::Interface::vtable(this).13)(::std::mem::transmute_copy(this), value).ok() } 189 } Weight(&self) -> ::windows::runtime::Result<u16>190 pub fn Weight(&self) -> ::windows::runtime::Result<u16> { 191 let this = self; 192 unsafe { 193 let mut result__: u16 = ::std::mem::zeroed(); 194 (::windows::runtime::Interface::vtable(this).14)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u16>(result__) 195 } 196 } SetWeight(&self, value: u16) -> ::windows::runtime::Result<()>197 pub fn SetWeight(&self, value: u16) -> ::windows::runtime::Result<()> { 198 let this = self; 199 unsafe { (::windows::runtime::Interface::vtable(this).15)(::std::mem::transmute_copy(this), value).ok() } 200 } 201 #[cfg(feature = "Foundation_Collections")] TextAttributes(&self) -> ::windows::runtime::Result<super::super::super::Foundation::Collections::IMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>202 pub fn TextAttributes(&self) -> ::windows::runtime::Result<super::super::super::Foundation::Collections::IMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>> { 203 let this = self; 204 unsafe { 205 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 206 (::windows::runtime::Interface::vtable(this).16)(::std::mem::transmute_copy(this), &mut result__).from_abi::<super::super::super::Foundation::Collections::IMap<::windows::runtime::HSTRING, ::windows::runtime::HSTRING>>(result__) 207 } 208 } 209 #[cfg(all(feature = "Foundation", feature = "Networking_Sockets"))] RegisterStreamSocketListenerAsync1<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Sockets::StreamSocketListener>>(&self, socket: Param0) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<DnssdRegistrationResult>>210 pub fn RegisterStreamSocketListenerAsync1<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Sockets::StreamSocketListener>>(&self, socket: Param0) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<DnssdRegistrationResult>> { 211 let this = self; 212 unsafe { 213 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 214 (::windows::runtime::Interface::vtable(this).17)(::std::mem::transmute_copy(this), socket.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::IAsyncOperation<DnssdRegistrationResult>>(result__) 215 } 216 } 217 #[cfg(all(feature = "Foundation", feature = "Networking_Connectivity", feature = "Networking_Sockets"))] RegisterStreamSocketListenerAsync2<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Sockets::StreamSocketListener>, Param1: ::windows::runtime::IntoParam<'a, super::super::Connectivity::NetworkAdapter>>(&self, socket: Param0, adapter: Param1) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<DnssdRegistrationResult>>218 pub fn RegisterStreamSocketListenerAsync2<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Sockets::StreamSocketListener>, Param1: ::windows::runtime::IntoParam<'a, super::super::Connectivity::NetworkAdapter>>(&self, socket: Param0, adapter: Param1) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<DnssdRegistrationResult>> { 219 let this = self; 220 unsafe { 221 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 222 (::windows::runtime::Interface::vtable(this).18)(::std::mem::transmute_copy(this), socket.into_param().abi(), adapter.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::IAsyncOperation<DnssdRegistrationResult>>(result__) 223 } 224 } 225 #[cfg(all(feature = "Foundation", feature = "Networking_Sockets"))] RegisterDatagramSocketAsync1<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Sockets::DatagramSocket>>(&self, socket: Param0) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<DnssdRegistrationResult>>226 pub fn RegisterDatagramSocketAsync1<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Sockets::DatagramSocket>>(&self, socket: Param0) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<DnssdRegistrationResult>> { 227 let this = self; 228 unsafe { 229 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 230 (::windows::runtime::Interface::vtable(this).19)(::std::mem::transmute_copy(this), socket.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::IAsyncOperation<DnssdRegistrationResult>>(result__) 231 } 232 } 233 #[cfg(all(feature = "Foundation", feature = "Networking_Connectivity", feature = "Networking_Sockets"))] RegisterDatagramSocketAsync2<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Sockets::DatagramSocket>, Param1: ::windows::runtime::IntoParam<'a, super::super::Connectivity::NetworkAdapter>>(&self, socket: Param0, adapter: Param1) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<DnssdRegistrationResult>>234 pub fn RegisterDatagramSocketAsync2<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Sockets::DatagramSocket>, Param1: ::windows::runtime::IntoParam<'a, super::super::Connectivity::NetworkAdapter>>(&self, socket: Param0, adapter: Param1) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<DnssdRegistrationResult>> { 235 let this = self; 236 unsafe { 237 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 238 (::windows::runtime::Interface::vtable(this).20)(::std::mem::transmute_copy(this), socket.into_param().abi(), adapter.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::IAsyncOperation<DnssdRegistrationResult>>(result__) 239 } 240 } 241 #[cfg(feature = "Foundation")] ToString(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING>242 pub fn ToString(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 243 let this = &::windows::runtime::Interface::cast::<super::super::super::Foundation::IStringable>(self)?; 244 unsafe { 245 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 246 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 247 } 248 } Create<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param1: ::windows::runtime::IntoParam<'a, super::super::HostName>>(dnssdserviceinstancename: Param0, hostname: Param1, port: u16) -> ::windows::runtime::Result<DnssdServiceInstance>249 pub fn Create<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param1: ::windows::runtime::IntoParam<'a, super::super::HostName>>(dnssdserviceinstancename: Param0, hostname: Param1, port: u16) -> ::windows::runtime::Result<DnssdServiceInstance> { 250 Self::IDnssdServiceInstanceFactory(|this| unsafe { 251 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 252 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), dnssdserviceinstancename.into_param().abi(), hostname.into_param().abi(), port, &mut result__).from_abi::<DnssdServiceInstance>(result__) 253 }) 254 } IDnssdServiceInstanceFactory<R, F: FnOnce(&IDnssdServiceInstanceFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R>255 pub fn IDnssdServiceInstanceFactory<R, F: FnOnce(&IDnssdServiceInstanceFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R> { 256 static mut SHARED: ::windows::runtime::FactoryCache<DnssdServiceInstance, IDnssdServiceInstanceFactory> = ::windows::runtime::FactoryCache::new(); 257 unsafe { SHARED.call(callback) } 258 } 259 } 260 unsafe impl ::windows::runtime::RuntimeType for DnssdServiceInstance { 261 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance;{e246db7e-98a5-4ca1-b9e4-c253d33c35ff})"); 262 } 263 unsafe impl ::windows::runtime::Interface for DnssdServiceInstance { 264 type Vtable = IDnssdServiceInstance_abi; 265 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(3796294526, 39077, 19617, [185, 228, 194, 83, 211, 60, 53, 255]); 266 } 267 impl ::windows::runtime::RuntimeName for DnssdServiceInstance { 268 const NAME: &'static str = "Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance"; 269 } 270 impl ::std::convert::From<DnssdServiceInstance> for ::windows::runtime::IUnknown { from(value: DnssdServiceInstance) -> Self271 fn from(value: DnssdServiceInstance) -> Self { 272 unsafe { ::std::mem::transmute(value) } 273 } 274 } 275 impl ::std::convert::From<&DnssdServiceInstance> for ::windows::runtime::IUnknown { from(value: &DnssdServiceInstance) -> Self276 fn from(value: &DnssdServiceInstance) -> Self { 277 ::std::convert::From::from(::std::clone::Clone::clone(value)) 278 } 279 } 280 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for DnssdServiceInstance { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>281 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 282 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 283 } 284 } 285 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &DnssdServiceInstance { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>286 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 287 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 288 } 289 } 290 impl ::std::convert::From<DnssdServiceInstance> for ::windows::runtime::IInspectable { from(value: DnssdServiceInstance) -> Self291 fn from(value: DnssdServiceInstance) -> Self { 292 value.0 293 } 294 } 295 impl ::std::convert::From<&DnssdServiceInstance> for ::windows::runtime::IInspectable { from(value: &DnssdServiceInstance) -> Self296 fn from(value: &DnssdServiceInstance) -> Self { 297 value.0.clone() 298 } 299 } 300 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for DnssdServiceInstance { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>301 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 302 ::windows::runtime::Param::Owned(self.0) 303 } 304 } 305 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a DnssdServiceInstance { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>306 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 307 ::windows::runtime::Param::Borrowed(&self.0) 308 } 309 } 310 #[cfg(feature = "Foundation")] 311 impl ::std::convert::TryFrom<DnssdServiceInstance> for super::super::super::Foundation::IStringable { 312 type Error = ::windows::runtime::Error; try_from(value: DnssdServiceInstance) -> ::windows::runtime::Result<Self>313 fn try_from(value: DnssdServiceInstance) -> ::windows::runtime::Result<Self> { 314 ::std::convert::TryFrom::try_from(&value) 315 } 316 } 317 #[cfg(feature = "Foundation")] 318 impl ::std::convert::TryFrom<&DnssdServiceInstance> for super::super::super::Foundation::IStringable { 319 type Error = ::windows::runtime::Error; try_from(value: &DnssdServiceInstance) -> ::windows::runtime::Result<Self>320 fn try_from(value: &DnssdServiceInstance) -> ::windows::runtime::Result<Self> { 321 ::windows::runtime::Interface::cast(value) 322 } 323 } 324 #[cfg(feature = "Foundation")] 325 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::IStringable> for DnssdServiceInstance { into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IStringable>326 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IStringable> { 327 ::windows::runtime::IntoParam::into_param(&self) 328 } 329 } 330 #[cfg(feature = "Foundation")] 331 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::IStringable> for &DnssdServiceInstance { into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IStringable>332 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IStringable> { 333 ::std::convert::TryInto::<super::super::super::Foundation::IStringable>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 334 } 335 } 336 unsafe impl ::std::marker::Send for DnssdServiceInstance {} 337 unsafe impl ::std::marker::Sync for DnssdServiceInstance {} 338 #[cfg(feature = "Foundation_Collections")] 339 #[repr(transparent)] 340 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 341 pub struct DnssdServiceInstanceCollection(::windows::runtime::IInspectable); 342 #[cfg(feature = "Foundation_Collections")] 343 impl DnssdServiceInstanceCollection { 344 #[cfg(feature = "Foundation_Collections")] GetAt(&self, index: u32) -> ::windows::runtime::Result<DnssdServiceInstance>345 pub fn GetAt(&self, index: u32) -> ::windows::runtime::Result<DnssdServiceInstance> { 346 let this = self; 347 unsafe { 348 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 349 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), index, &mut result__).from_abi::<DnssdServiceInstance>(result__) 350 } 351 } 352 #[cfg(feature = "Foundation_Collections")] Size(&self) -> ::windows::runtime::Result<u32>353 pub fn Size(&self) -> ::windows::runtime::Result<u32> { 354 let this = self; 355 unsafe { 356 let mut result__: u32 = ::std::mem::zeroed(); 357 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) 358 } 359 } 360 #[cfg(feature = "Foundation_Collections")] IndexOf<'a, Param0: ::windows::runtime::IntoParam<'a, DnssdServiceInstance>>(&self, value: Param0, index: &mut u32) -> ::windows::runtime::Result<bool>361 pub fn IndexOf<'a, Param0: ::windows::runtime::IntoParam<'a, DnssdServiceInstance>>(&self, value: Param0, index: &mut u32) -> ::windows::runtime::Result<bool> { 362 let this = self; 363 unsafe { 364 let mut result__: bool = ::std::mem::zeroed(); 365 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), value.into_param().abi(), index, &mut result__).from_abi::<bool>(result__) 366 } 367 } 368 #[cfg(feature = "Foundation_Collections")] GetMany(&self, startindex: u32, items: &mut [<DnssdServiceInstance as ::windows::runtime::Abi>::DefaultType]) -> ::windows::runtime::Result<u32>369 pub fn GetMany(&self, startindex: u32, items: &mut [<DnssdServiceInstance as ::windows::runtime::Abi>::DefaultType]) -> ::windows::runtime::Result<u32> { 370 let this = self; 371 unsafe { 372 let mut result__: u32 = ::std::mem::zeroed(); 373 (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), startindex, items.len() as u32, ::std::mem::transmute_copy(&items), &mut result__).from_abi::<u32>(result__) 374 } 375 } 376 #[cfg(feature = "Foundation_Collections")] First(&self) -> ::windows::runtime::Result<super::super::super::Foundation::Collections::IIterator<DnssdServiceInstance>>377 pub fn First(&self) -> ::windows::runtime::Result<super::super::super::Foundation::Collections::IIterator<DnssdServiceInstance>> { 378 let this = &::windows::runtime::Interface::cast::<super::super::super::Foundation::Collections::IIterable<DnssdServiceInstance>>(self)?; 379 unsafe { 380 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 381 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<super::super::super::Foundation::Collections::IIterator<DnssdServiceInstance>>(result__) 382 } 383 } 384 } 385 #[cfg(feature = "Foundation_Collections")] 386 unsafe impl ::windows::runtime::RuntimeType for DnssdServiceInstanceCollection { 387 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstanceCollection;pinterface({bbe1fa4c-b0e3-4583-baef-1f1b2e483e56};rc(Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstance;{e246db7e-98a5-4ca1-b9e4-c253d33c35ff})))"); 388 } 389 #[cfg(feature = "Foundation_Collections")] 390 unsafe impl ::windows::runtime::Interface for DnssdServiceInstanceCollection { 391 type Vtable = super::super::super::Foundation::Collections::IVectorView_abi<DnssdServiceInstance>; 392 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_signature(<super::super::super::Foundation::Collections::IVectorView<DnssdServiceInstance> as ::windows::runtime::RuntimeType>::SIGNATURE); 393 } 394 #[cfg(feature = "Foundation_Collections")] 395 impl ::windows::runtime::RuntimeName for DnssdServiceInstanceCollection { 396 const NAME: &'static str = "Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceInstanceCollection"; 397 } 398 #[cfg(feature = "Foundation_Collections")] 399 impl ::std::convert::From<DnssdServiceInstanceCollection> for ::windows::runtime::IUnknown { from(value: DnssdServiceInstanceCollection) -> Self400 fn from(value: DnssdServiceInstanceCollection) -> Self { 401 unsafe { ::std::mem::transmute(value) } 402 } 403 } 404 #[cfg(feature = "Foundation_Collections")] 405 impl ::std::convert::From<&DnssdServiceInstanceCollection> for ::windows::runtime::IUnknown { from(value: &DnssdServiceInstanceCollection) -> Self406 fn from(value: &DnssdServiceInstanceCollection) -> Self { 407 ::std::convert::From::from(::std::clone::Clone::clone(value)) 408 } 409 } 410 #[cfg(feature = "Foundation_Collections")] 411 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for DnssdServiceInstanceCollection { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>412 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 413 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 414 } 415 } 416 #[cfg(feature = "Foundation_Collections")] 417 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &DnssdServiceInstanceCollection { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>418 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 419 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 420 } 421 } 422 #[cfg(feature = "Foundation_Collections")] 423 impl ::std::convert::From<DnssdServiceInstanceCollection> for ::windows::runtime::IInspectable { from(value: DnssdServiceInstanceCollection) -> Self424 fn from(value: DnssdServiceInstanceCollection) -> Self { 425 value.0 426 } 427 } 428 #[cfg(feature = "Foundation_Collections")] 429 impl ::std::convert::From<&DnssdServiceInstanceCollection> for ::windows::runtime::IInspectable { from(value: &DnssdServiceInstanceCollection) -> Self430 fn from(value: &DnssdServiceInstanceCollection) -> Self { 431 value.0.clone() 432 } 433 } 434 #[cfg(feature = "Foundation_Collections")] 435 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for DnssdServiceInstanceCollection { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>436 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 437 ::windows::runtime::Param::Owned(self.0) 438 } 439 } 440 #[cfg(feature = "Foundation_Collections")] 441 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a DnssdServiceInstanceCollection { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>442 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 443 ::windows::runtime::Param::Borrowed(&self.0) 444 } 445 } 446 #[cfg(feature = "Foundation_Collections")] 447 impl ::std::convert::From<DnssdServiceInstanceCollection> for super::super::super::Foundation::Collections::IVectorView<DnssdServiceInstance> { from(value: DnssdServiceInstanceCollection) -> Self448 fn from(value: DnssdServiceInstanceCollection) -> Self { 449 unsafe { ::std::mem::transmute(value) } 450 } 451 } 452 #[cfg(feature = "Foundation_Collections")] 453 impl ::std::convert::From<&DnssdServiceInstanceCollection> for super::super::super::Foundation::Collections::IVectorView<DnssdServiceInstance> { from(value: &DnssdServiceInstanceCollection) -> Self454 fn from(value: &DnssdServiceInstanceCollection) -> Self { 455 ::std::convert::From::from(::std::clone::Clone::clone(value)) 456 } 457 } 458 #[cfg(feature = "Foundation_Collections")] 459 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Collections::IVectorView<DnssdServiceInstance>> for DnssdServiceInstanceCollection { into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::Collections::IVectorView<DnssdServiceInstance>>460 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::Collections::IVectorView<DnssdServiceInstance>> { 461 ::windows::runtime::Param::Owned(::std::convert::Into::<super::super::super::Foundation::Collections::IVectorView<DnssdServiceInstance>>::into(self)) 462 } 463 } 464 #[cfg(feature = "Foundation_Collections")] 465 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Collections::IVectorView<DnssdServiceInstance>> for &DnssdServiceInstanceCollection { into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::Collections::IVectorView<DnssdServiceInstance>>466 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::Collections::IVectorView<DnssdServiceInstance>> { 467 ::windows::runtime::Param::Owned(::std::convert::Into::<super::super::super::Foundation::Collections::IVectorView<DnssdServiceInstance>>::into(::std::clone::Clone::clone(self))) 468 } 469 } 470 #[cfg(feature = "Foundation_Collections")] 471 impl ::std::convert::TryFrom<DnssdServiceInstanceCollection> for super::super::super::Foundation::Collections::IIterable<DnssdServiceInstance> { 472 type Error = ::windows::runtime::Error; try_from(value: DnssdServiceInstanceCollection) -> ::windows::runtime::Result<Self>473 fn try_from(value: DnssdServiceInstanceCollection) -> ::windows::runtime::Result<Self> { 474 ::std::convert::TryFrom::try_from(&value) 475 } 476 } 477 #[cfg(feature = "Foundation_Collections")] 478 impl ::std::convert::TryFrom<&DnssdServiceInstanceCollection> for super::super::super::Foundation::Collections::IIterable<DnssdServiceInstance> { 479 type Error = ::windows::runtime::Error; try_from(value: &DnssdServiceInstanceCollection) -> ::windows::runtime::Result<Self>480 fn try_from(value: &DnssdServiceInstanceCollection) -> ::windows::runtime::Result<Self> { 481 ::windows::runtime::Interface::cast(value) 482 } 483 } 484 #[cfg(feature = "Foundation_Collections")] 485 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Collections::IIterable<DnssdServiceInstance>> for DnssdServiceInstanceCollection { into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::Collections::IIterable<DnssdServiceInstance>>486 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::Collections::IIterable<DnssdServiceInstance>> { 487 ::windows::runtime::IntoParam::into_param(&self) 488 } 489 } 490 #[cfg(feature = "Foundation_Collections")] 491 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Collections::IIterable<DnssdServiceInstance>> for &DnssdServiceInstanceCollection { into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::Collections::IIterable<DnssdServiceInstance>>492 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::Collections::IIterable<DnssdServiceInstance>> { 493 ::std::convert::TryInto::<super::super::super::Foundation::Collections::IIterable<DnssdServiceInstance>>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 494 } 495 } 496 #[cfg(feature = "Foundation_Collections")] 497 unsafe impl ::std::marker::Send for DnssdServiceInstanceCollection {} 498 #[cfg(feature = "Foundation_Collections")] 499 unsafe impl ::std::marker::Sync for DnssdServiceInstanceCollection {} 500 #[cfg(all(feature = "Foundation_Collections"))] 501 impl ::std::iter::IntoIterator for DnssdServiceInstanceCollection { 502 type Item = DnssdServiceInstance; 503 type IntoIter = super::super::super::Foundation::Collections::VectorViewIterator<Self::Item>; into_iter(self) -> Self::IntoIter504 fn into_iter(self) -> Self::IntoIter { 505 ::std::iter::IntoIterator::into_iter(&self) 506 } 507 } 508 #[cfg(all(feature = "Foundation_Collections"))] 509 impl ::std::iter::IntoIterator for &DnssdServiceInstanceCollection { 510 type Item = DnssdServiceInstance; 511 type IntoIter = super::super::super::Foundation::Collections::VectorViewIterator<Self::Item>; into_iter(self) -> Self::IntoIter512 fn into_iter(self) -> Self::IntoIter { 513 super::super::super::Foundation::Collections::VectorViewIterator::new(::std::convert::TryInto::try_into(self).ok()) 514 } 515 } 516 #[repr(transparent)] 517 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 518 pub struct DnssdServiceWatcher(::windows::runtime::IInspectable); 519 impl DnssdServiceWatcher { 520 #[cfg(feature = "Foundation")] Added<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TypedEventHandler<DnssdServiceWatcher, DnssdServiceInstance>>>(&self, handler: Param0) -> ::windows::runtime::Result<super::super::super::Foundation::EventRegistrationToken>521 pub fn Added<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TypedEventHandler<DnssdServiceWatcher, DnssdServiceInstance>>>(&self, handler: Param0) -> ::windows::runtime::Result<super::super::super::Foundation::EventRegistrationToken> { 522 let this = self; 523 unsafe { 524 let mut result__: super::super::super::Foundation::EventRegistrationToken = ::std::mem::zeroed(); 525 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::EventRegistrationToken>(result__) 526 } 527 } 528 #[cfg(feature = "Foundation")] RemoveAdded<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()>529 pub fn RemoveAdded<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()> { 530 let this = self; 531 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), token.into_param().abi()).ok() } 532 } 533 #[cfg(feature = "Foundation")] EnumerationCompleted<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TypedEventHandler<DnssdServiceWatcher, ::windows::runtime::IInspectable>>>(&self, handler: Param0) -> ::windows::runtime::Result<super::super::super::Foundation::EventRegistrationToken>534 pub fn EnumerationCompleted<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TypedEventHandler<DnssdServiceWatcher, ::windows::runtime::IInspectable>>>(&self, handler: Param0) -> ::windows::runtime::Result<super::super::super::Foundation::EventRegistrationToken> { 535 let this = self; 536 unsafe { 537 let mut result__: super::super::super::Foundation::EventRegistrationToken = ::std::mem::zeroed(); 538 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::EventRegistrationToken>(result__) 539 } 540 } 541 #[cfg(feature = "Foundation")] RemoveEnumerationCompleted<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()>542 pub fn RemoveEnumerationCompleted<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()> { 543 let this = self; 544 unsafe { (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), token.into_param().abi()).ok() } 545 } 546 #[cfg(feature = "Foundation")] Stopped<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TypedEventHandler<DnssdServiceWatcher, ::windows::runtime::IInspectable>>>(&self, handler: Param0) -> ::windows::runtime::Result<super::super::super::Foundation::EventRegistrationToken>547 pub fn Stopped<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TypedEventHandler<DnssdServiceWatcher, ::windows::runtime::IInspectable>>>(&self, handler: Param0) -> ::windows::runtime::Result<super::super::super::Foundation::EventRegistrationToken> { 548 let this = self; 549 unsafe { 550 let mut result__: super::super::super::Foundation::EventRegistrationToken = ::std::mem::zeroed(); 551 (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::EventRegistrationToken>(result__) 552 } 553 } 554 #[cfg(feature = "Foundation")] RemoveStopped<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()>555 pub fn RemoveStopped<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::runtime::Result<()> { 556 let this = self; 557 unsafe { (::windows::runtime::Interface::vtable(this).11)(::std::mem::transmute_copy(this), token.into_param().abi()).ok() } 558 } Status(&self) -> ::windows::runtime::Result<DnssdServiceWatcherStatus>559 pub fn Status(&self) -> ::windows::runtime::Result<DnssdServiceWatcherStatus> { 560 let this = self; 561 unsafe { 562 let mut result__: DnssdServiceWatcherStatus = ::std::mem::zeroed(); 563 (::windows::runtime::Interface::vtable(this).12)(::std::mem::transmute_copy(this), &mut result__).from_abi::<DnssdServiceWatcherStatus>(result__) 564 } 565 } Start(&self) -> ::windows::runtime::Result<()>566 pub fn Start(&self) -> ::windows::runtime::Result<()> { 567 let this = self; 568 unsafe { (::windows::runtime::Interface::vtable(this).13)(::std::mem::transmute_copy(this)).ok() } 569 } Stop(&self) -> ::windows::runtime::Result<()>570 pub fn Stop(&self) -> ::windows::runtime::Result<()> { 571 let this = self; 572 unsafe { (::windows::runtime::Interface::vtable(this).14)(::std::mem::transmute_copy(this)).ok() } 573 } 574 } 575 unsafe impl ::windows::runtime::RuntimeType for DnssdServiceWatcher { 576 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceWatcher;{cc34d9c1-db7d-4b69-983d-c6f83f205682})"); 577 } 578 unsafe impl ::windows::runtime::Interface for DnssdServiceWatcher { 579 type Vtable = IDnssdServiceWatcher_abi; 580 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(3426015681, 56189, 19305, [152, 61, 198, 248, 63, 32, 86, 130]); 581 } 582 impl ::windows::runtime::RuntimeName for DnssdServiceWatcher { 583 const NAME: &'static str = "Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceWatcher"; 584 } 585 impl ::std::convert::From<DnssdServiceWatcher> for ::windows::runtime::IUnknown { from(value: DnssdServiceWatcher) -> Self586 fn from(value: DnssdServiceWatcher) -> Self { 587 unsafe { ::std::mem::transmute(value) } 588 } 589 } 590 impl ::std::convert::From<&DnssdServiceWatcher> for ::windows::runtime::IUnknown { from(value: &DnssdServiceWatcher) -> Self591 fn from(value: &DnssdServiceWatcher) -> Self { 592 ::std::convert::From::from(::std::clone::Clone::clone(value)) 593 } 594 } 595 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for DnssdServiceWatcher { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>596 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 597 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 598 } 599 } 600 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &DnssdServiceWatcher { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>601 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 602 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 603 } 604 } 605 impl ::std::convert::From<DnssdServiceWatcher> for ::windows::runtime::IInspectable { from(value: DnssdServiceWatcher) -> Self606 fn from(value: DnssdServiceWatcher) -> Self { 607 value.0 608 } 609 } 610 impl ::std::convert::From<&DnssdServiceWatcher> for ::windows::runtime::IInspectable { from(value: &DnssdServiceWatcher) -> Self611 fn from(value: &DnssdServiceWatcher) -> Self { 612 value.0.clone() 613 } 614 } 615 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for DnssdServiceWatcher { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>616 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 617 ::windows::runtime::Param::Owned(self.0) 618 } 619 } 620 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a DnssdServiceWatcher { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>621 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 622 ::windows::runtime::Param::Borrowed(&self.0) 623 } 624 } 625 unsafe impl ::std::marker::Send for DnssdServiceWatcher {} 626 unsafe impl ::std::marker::Sync for DnssdServiceWatcher {} 627 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)] 628 #[repr(transparent)] 629 pub struct DnssdServiceWatcherStatus(pub i32); 630 impl DnssdServiceWatcherStatus { 631 pub const Created: DnssdServiceWatcherStatus = DnssdServiceWatcherStatus(0i32); 632 pub const Started: DnssdServiceWatcherStatus = DnssdServiceWatcherStatus(1i32); 633 pub const EnumerationCompleted: DnssdServiceWatcherStatus = DnssdServiceWatcherStatus(2i32); 634 pub const Stopping: DnssdServiceWatcherStatus = DnssdServiceWatcherStatus(3i32); 635 pub const Stopped: DnssdServiceWatcherStatus = DnssdServiceWatcherStatus(4i32); 636 pub const Aborted: DnssdServiceWatcherStatus = DnssdServiceWatcherStatus(5i32); 637 } 638 impl ::std::convert::From<i32> for DnssdServiceWatcherStatus { from(value: i32) -> Self639 fn from(value: i32) -> Self { 640 Self(value) 641 } 642 } 643 unsafe impl ::windows::runtime::Abi for DnssdServiceWatcherStatus { 644 type Abi = Self; 645 type DefaultType = Self; 646 } 647 unsafe impl ::windows::runtime::RuntimeType for DnssdServiceWatcherStatus { 648 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"enum(Windows.Networking.ServiceDiscovery.Dnssd.DnssdServiceWatcherStatus;i4)"); 649 } 650 #[repr(transparent)] 651 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 652 #[doc(hidden)] 653 pub struct IDnssdRegistrationResult(::windows::runtime::IInspectable); 654 unsafe impl ::windows::runtime::Interface for IDnssdRegistrationResult { 655 type Vtable = IDnssdRegistrationResult_abi; 656 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1031301842, 58886, 21328, [115, 234, 126, 151, 240, 102, 22, 47]); 657 } 658 #[repr(C)] 659 #[doc(hidden)] 660 pub struct IDnssdRegistrationResult_abi( 661 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 662 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 663 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 664 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 665 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 666 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 667 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut DnssdRegistrationStatus) -> ::windows::runtime::HRESULT, 668 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 669 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut bool) -> ::windows::runtime::HRESULT, 670 ); 671 #[repr(transparent)] 672 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 673 #[doc(hidden)] 674 pub struct IDnssdServiceInstance(::windows::runtime::IInspectable); 675 unsafe impl ::windows::runtime::Interface for IDnssdServiceInstance { 676 type Vtable = IDnssdServiceInstance_abi; 677 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(3796294526, 39077, 19617, [185, 228, 194, 83, 211, 60, 53, 255]); 678 } 679 #[repr(C)] 680 #[doc(hidden)] 681 pub struct IDnssdServiceInstance_abi( 682 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 683 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 684 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 685 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 686 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 687 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 688 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 689 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 690 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 691 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 692 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut u16) -> ::windows::runtime::HRESULT, 693 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: u16) -> ::windows::runtime::HRESULT, 694 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut u16) -> ::windows::runtime::HRESULT, 695 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: u16) -> ::windows::runtime::HRESULT, 696 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut u16) -> ::windows::runtime::HRESULT, 697 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: u16) -> ::windows::runtime::HRESULT, 698 #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 699 #[cfg(not(feature = "Foundation_Collections"))] usize, 700 #[cfg(all(feature = "Foundation", feature = "Networking_Sockets"))] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, socket: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 701 #[cfg(not(all(feature = "Foundation", feature = "Networking_Sockets")))] usize, 702 #[cfg(all(feature = "Foundation", feature = "Networking_Connectivity", feature = "Networking_Sockets"))] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, socket: ::windows::runtime::RawPtr, adapter: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 703 #[cfg(not(all(feature = "Foundation", feature = "Networking_Connectivity", feature = "Networking_Sockets")))] usize, 704 #[cfg(all(feature = "Foundation", feature = "Networking_Sockets"))] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, socket: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 705 #[cfg(not(all(feature = "Foundation", feature = "Networking_Sockets")))] usize, 706 #[cfg(all(feature = "Foundation", feature = "Networking_Connectivity", feature = "Networking_Sockets"))] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, socket: ::windows::runtime::RawPtr, adapter: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 707 #[cfg(not(all(feature = "Foundation", feature = "Networking_Connectivity", feature = "Networking_Sockets")))] usize, 708 ); 709 #[repr(transparent)] 710 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 711 #[doc(hidden)] 712 pub struct IDnssdServiceInstanceFactory(::windows::runtime::IInspectable); 713 unsafe impl ::windows::runtime::Interface for IDnssdServiceInstanceFactory { 714 type Vtable = IDnssdServiceInstanceFactory_abi; 715 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1823498657, 50296, 17201, [150, 132, 74, 242, 24, 108, 10, 43]); 716 } 717 #[repr(C)] 718 #[doc(hidden)] 719 pub struct IDnssdServiceInstanceFactory_abi( 720 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 721 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 722 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 723 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 724 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 725 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 726 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, dnssdserviceinstancename: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, hostname: ::windows::runtime::RawPtr, port: u16, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 727 ); 728 #[repr(transparent)] 729 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 730 #[doc(hidden)] 731 pub struct IDnssdServiceWatcher(::windows::runtime::IInspectable); 732 unsafe impl ::windows::runtime::Interface for IDnssdServiceWatcher { 733 type Vtable = IDnssdServiceWatcher_abi; 734 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(3426015681, 56189, 19305, [152, 61, 198, 248, 63, 32, 86, 130]); 735 } 736 #[repr(C)] 737 #[doc(hidden)] 738 pub struct IDnssdServiceWatcher_abi( 739 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 740 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 741 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 742 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 743 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 744 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 745 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, handler: ::windows::runtime::RawPtr, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows::runtime::HRESULT, 746 #[cfg(not(feature = "Foundation"))] usize, 747 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::runtime::HRESULT, 748 #[cfg(not(feature = "Foundation"))] usize, 749 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, handler: ::windows::runtime::RawPtr, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows::runtime::HRESULT, 750 #[cfg(not(feature = "Foundation"))] usize, 751 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::runtime::HRESULT, 752 #[cfg(not(feature = "Foundation"))] usize, 753 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, handler: ::windows::runtime::RawPtr, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows::runtime::HRESULT, 754 #[cfg(not(feature = "Foundation"))] usize, 755 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::runtime::HRESULT, 756 #[cfg(not(feature = "Foundation"))] usize, 757 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut DnssdServiceWatcherStatus) -> ::windows::runtime::HRESULT, 758 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 759 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 760 ); 761