#[cfg(feature = "Win32_System_Com")]
windows_core::imp::define_interface!(IWindowsMediaLibrarySharingDevice, IWindowsMediaLibrarySharingDevice_Vtbl, 0x3dccc293_4fd9_4191_a25b_8e57c5d27bd4);
#[cfg(feature = "Win32_System_Com")]
impl core::ops::Deref for IWindowsMediaLibrarySharingDevice {
type Target = super::super::System::Com::IDispatch;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_System_Com")]
windows_core::imp::interface_hierarchy!(IWindowsMediaLibrarySharingDevice, windows_core::IUnknown, super::super::System::Com::IDispatch);
#[cfg(feature = "Win32_System_Com")]
impl IWindowsMediaLibrarySharingDevice {
pub unsafe fn DeviceID(&self) -> windows_core::Result<windows_core::BSTR> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).DeviceID)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
pub unsafe fn Authorization(&self) -> windows_core::Result<WindowsMediaLibrarySharingDeviceAuthorizationStatus> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Authorization)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
pub unsafe fn SetAuthorization(&self, authorization: WindowsMediaLibrarySharingDeviceAuthorizationStatus) -> windows_core::Result<()> {
(windows_core::Interface::vtable(self).SetAuthorization)(windows_core::Interface::as_raw(self), authorization).ok()
}
#[cfg(feature = "Win32_System_Com")]
pub unsafe fn Properties(&self) -> windows_core::Result<IWindowsMediaLibrarySharingDeviceProperties> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Properties)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_System_Com")]
#[repr(C)]
pub struct IWindowsMediaLibrarySharingDevice_Vtbl {
pub base__: super::super::System::Com::IDispatch_Vtbl,
pub DeviceID: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::mem::MaybeUninit<windows_core::BSTR>) -> windows_core::HRESULT,
pub Authorization: unsafe extern "system" fn(*mut core::ffi::c_void, *mut WindowsMediaLibrarySharingDeviceAuthorizationStatus) -> windows_core::HRESULT,
pub SetAuthorization: unsafe extern "system" fn(*mut core::ffi::c_void, WindowsMediaLibrarySharingDeviceAuthorizationStatus) -> windows_core::HRESULT,
#[cfg(feature = "Win32_System_Com")]
pub Properties: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_System_Com"))]
Properties: usize,
}
#[cfg(feature = "Win32_System_Com")]
windows_core::imp::define_interface!(IWindowsMediaLibrarySharingDeviceProperties, IWindowsMediaLibrarySharingDeviceProperties_Vtbl, 0xc4623214_6b06_40c5_a623_b2ff4c076bfd);
#[cfg(feature = "Win32_System_Com")]
impl core::ops::Deref for IWindowsMediaLibrarySharingDeviceProperties {
type Target = super::super::System::Com::IDispatch;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_System_Com")]
windows_core::imp::interface_hierarchy!(IWindowsMediaLibrarySharingDeviceProperties, windows_core::IUnknown, super::super::System::Com::IDispatch);
#[cfg(feature = "Win32_System_Com")]
impl IWindowsMediaLibrarySharingDeviceProperties {
#[cfg(feature = "Win32_System_Com")]
pub unsafe fn get_Item(&self, index: i32) -> windows_core::Result<IWindowsMediaLibrarySharingDeviceProperty> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).get_Item)(windows_core::Interface::as_raw(self), index, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
pub unsafe fn Count(&self) -> windows_core::Result<i32> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
#[cfg(feature = "Win32_System_Com")]
pub unsafe fn GetProperty<P0>(&self, name: P0) -> windows_core::Result<IWindowsMediaLibrarySharingDeviceProperty>
where
P0: windows_core::Param<windows_core::BSTR>,
{
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), name.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_System_Com")]
#[repr(C)]
pub struct IWindowsMediaLibrarySharingDeviceProperties_Vtbl {
pub base__: super::super::System::Com::IDispatch_Vtbl,
#[cfg(feature = "Win32_System_Com")]
pub get_Item: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_System_Com"))]
get_Item: usize,
pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
#[cfg(feature = "Win32_System_Com")]
pub GetProperty: unsafe extern "system" fn(*mut core::ffi::c_void, core::mem::MaybeUninit<windows_core::BSTR>, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_System_Com"))]
GetProperty: usize,
}
#[cfg(feature = "Win32_System_Com")]
windows_core::imp::define_interface!(IWindowsMediaLibrarySharingDeviceProperty, IWindowsMediaLibrarySharingDeviceProperty_Vtbl, 0x81e26927_7a7d_40a7_81d4_bddc02960e3e);
#[cfg(feature = "Win32_System_Com")]
impl core::ops::Deref for IWindowsMediaLibrarySharingDeviceProperty {
type Target = super::super::System::Com::IDispatch;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_System_Com")]
windows_core::imp::interface_hierarchy!(IWindowsMediaLibrarySharingDeviceProperty, windows_core::IUnknown, super::super::System::Com::IDispatch);
#[cfg(feature = "Win32_System_Com")]
impl IWindowsMediaLibrarySharingDeviceProperty {
pub unsafe fn Name(&self) -> windows_core::Result<windows_core::BSTR> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Name)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
pub unsafe fn Value(&self) -> windows_core::Result<windows_core::VARIANT> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Value)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_System_Com")]
#[repr(C)]
pub struct IWindowsMediaLibrarySharingDeviceProperty_Vtbl {
pub base__: super::super::System::Com::IDispatch_Vtbl,
pub Name: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::mem::MaybeUninit<windows_core::BSTR>) -> windows_core::HRESULT,
pub Value: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::mem::MaybeUninit<windows_core::VARIANT>) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_System_Com")]
windows_core::imp::define_interface!(IWindowsMediaLibrarySharingDevices, IWindowsMediaLibrarySharingDevices_Vtbl, 0x1803f9d6_fe6d_4546_bf5b_992fe8ec12d1);
#[cfg(feature = "Win32_System_Com")]
impl core::ops::Deref for IWindowsMediaLibrarySharingDevices {
type Target = super::super::System::Com::IDispatch;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_System_Com")]
windows_core::imp::interface_hierarchy!(IWindowsMediaLibrarySharingDevices, windows_core::IUnknown, super::super::System::Com::IDispatch);
#[cfg(feature = "Win32_System_Com")]
impl IWindowsMediaLibrarySharingDevices {
#[cfg(feature = "Win32_System_Com")]
pub unsafe fn get_Item(&self, index: i32) -> windows_core::Result<IWindowsMediaLibrarySharingDevice> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).get_Item)(windows_core::Interface::as_raw(self), index, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
pub unsafe fn Count(&self) -> windows_core::Result<i32> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Count)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
#[cfg(feature = "Win32_System_Com")]
pub unsafe fn GetDevice<P0>(&self, deviceid: P0) -> windows_core::Result<IWindowsMediaLibrarySharingDevice>
where
P0: windows_core::Param<windows_core::BSTR>,
{
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDevice)(windows_core::Interface::as_raw(self), deviceid.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_System_Com")]
#[repr(C)]
pub struct IWindowsMediaLibrarySharingDevices_Vtbl {
pub base__: super::super::System::Com::IDispatch_Vtbl,
#[cfg(feature = "Win32_System_Com")]
pub get_Item: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_System_Com"))]
get_Item: usize,
pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
#[cfg(feature = "Win32_System_Com")]
pub GetDevice: unsafe extern "system" fn(*mut core::ffi::c_void, core::mem::MaybeUninit<windows_core::BSTR>, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_System_Com"))]
GetDevice: usize,
}
#[cfg(feature = "Win32_System_Com")]
windows_core::imp::define_interface!(IWindowsMediaLibrarySharingServices, IWindowsMediaLibrarySharingServices_Vtbl, 0x01f5f85e_0a81_40da_a7c8_21ef3af8440c);
#[cfg(feature = "Win32_System_Com")]
impl core::ops::Deref for IWindowsMediaLibrarySharingServices {
type Target = super::super::System::Com::IDispatch;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_System_Com")]
windows_core::imp::interface_hierarchy!(IWindowsMediaLibrarySharingServices, windows_core::IUnknown, super::super::System::Com::IDispatch);
#[cfg(feature = "Win32_System_Com")]
impl IWindowsMediaLibrarySharingServices {
pub unsafe fn showShareMediaCPL<P0>(&self, device: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::BSTR>,
{
(windows_core::Interface::vtable(self).showShareMediaCPL)(windows_core::Interface::as_raw(self), device.param().abi()).ok()
}
pub unsafe fn userHomeMediaSharingState(&self) -> windows_core::Result<super::super::Foundation::VARIANT_BOOL> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).userHomeMediaSharingState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
pub unsafe fn SetuserHomeMediaSharingState<P0>(&self, sharingenabled: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Foundation::VARIANT_BOOL>,
{
(windows_core::Interface::vtable(self).SetuserHomeMediaSharingState)(windows_core::Interface::as_raw(self), sharingenabled.param().abi()).ok()
}
pub unsafe fn userHomeMediaSharingLibraryName(&self) -> windows_core::Result<windows_core::BSTR> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).userHomeMediaSharingLibraryName)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
pub unsafe fn SetuserHomeMediaSharingLibraryName<P0>(&self, libraryname: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::BSTR>,
{
(windows_core::Interface::vtable(self).SetuserHomeMediaSharingLibraryName)(windows_core::Interface::as_raw(self), libraryname.param().abi()).ok()
}
pub unsafe fn computerHomeMediaSharingAllowedState(&self) -> windows_core::Result<super::super::Foundation::VARIANT_BOOL> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).computerHomeMediaSharingAllowedState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
pub unsafe fn SetcomputerHomeMediaSharingAllowedState<P0>(&self, sharingallowed: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Foundation::VARIANT_BOOL>,
{
(windows_core::Interface::vtable(self).SetcomputerHomeMediaSharingAllowedState)(windows_core::Interface::as_raw(self), sharingallowed.param().abi()).ok()
}
pub unsafe fn userInternetMediaSharingState(&self) -> windows_core::Result<super::super::Foundation::VARIANT_BOOL> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).userInternetMediaSharingState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
pub unsafe fn SetuserInternetMediaSharingState<P0>(&self, sharingenabled: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Foundation::VARIANT_BOOL>,
{
(windows_core::Interface::vtable(self).SetuserInternetMediaSharingState)(windows_core::Interface::as_raw(self), sharingenabled.param().abi()).ok()
}
pub unsafe fn computerInternetMediaSharingAllowedState(&self) -> windows_core::Result<super::super::Foundation::VARIANT_BOOL> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).computerInternetMediaSharingAllowedState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
pub unsafe fn SetcomputerInternetMediaSharingAllowedState<P0>(&self, sharingallowed: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Foundation::VARIANT_BOOL>,
{
(windows_core::Interface::vtable(self).SetcomputerInternetMediaSharingAllowedState)(windows_core::Interface::as_raw(self), sharingallowed.param().abi()).ok()
}
pub unsafe fn internetMediaSharingSecurityGroup(&self) -> windows_core::Result<windows_core::BSTR> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).internetMediaSharingSecurityGroup)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
pub unsafe fn SetinternetMediaSharingSecurityGroup<P0>(&self, securitygroup: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::BSTR>,
{
(windows_core::Interface::vtable(self).SetinternetMediaSharingSecurityGroup)(windows_core::Interface::as_raw(self), securitygroup.param().abi()).ok()
}
pub unsafe fn allowSharingToAllDevices(&self) -> windows_core::Result<super::super::Foundation::VARIANT_BOOL> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).allowSharingToAllDevices)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
pub unsafe fn SetallowSharingToAllDevices<P0>(&self, sharingenabled: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Foundation::VARIANT_BOOL>,
{
(windows_core::Interface::vtable(self).SetallowSharingToAllDevices)(windows_core::Interface::as_raw(self), sharingenabled.param().abi()).ok()
}
pub unsafe fn setDefaultAuthorization<P0, P1, P2>(&self, macaddresses: P0, friendlyname: P1, authorization: P2) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::BSTR>,
P1: windows_core::Param<windows_core::BSTR>,
P2: windows_core::Param<super::super::Foundation::VARIANT_BOOL>,
{
(windows_core::Interface::vtable(self).setDefaultAuthorization)(windows_core::Interface::as_raw(self), macaddresses.param().abi(), friendlyname.param().abi(), authorization.param().abi()).ok()
}
pub unsafe fn setAuthorizationState<P0, P1>(&self, macaddress: P0, authorizationstate: P1) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::BSTR>,
P1: windows_core::Param<super::super::Foundation::VARIANT_BOOL>,
{
(windows_core::Interface::vtable(self).setAuthorizationState)(windows_core::Interface::as_raw(self), macaddress.param().abi(), authorizationstate.param().abi()).ok()
}
#[cfg(feature = "Win32_System_Com")]
pub unsafe fn getAllDevices(&self) -> windows_core::Result<IWindowsMediaLibrarySharingDevices> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).getAllDevices)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
pub unsafe fn customSettingsApplied(&self) -> windows_core::Result<super::super::Foundation::VARIANT_BOOL> {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).customSettingsApplied)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
#[cfg(feature = "Win32_System_Com")]
#[repr(C)]
pub struct IWindowsMediaLibrarySharingServices_Vtbl {
pub base__: super::super::System::Com::IDispatch_Vtbl,
pub showShareMediaCPL: unsafe extern "system" fn(*mut core::ffi::c_void, core::mem::MaybeUninit<windows_core::BSTR>) -> windows_core::HRESULT,
pub userHomeMediaSharingState: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT,
pub SetuserHomeMediaSharingState: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT,
pub userHomeMediaSharingLibraryName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::mem::MaybeUninit<windows_core::BSTR>) -> windows_core::HRESULT,
pub SetuserHomeMediaSharingLibraryName: unsafe extern "system" fn(*mut core::ffi::c_void, core::mem::MaybeUninit<windows_core::BSTR>) -> windows_core::HRESULT,
pub computerHomeMediaSharingAllowedState: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT,
pub SetcomputerHomeMediaSharingAllowedState: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT,
pub userInternetMediaSharingState: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT,
pub SetuserInternetMediaSharingState: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT,
pub computerInternetMediaSharingAllowedState: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT,
pub SetcomputerInternetMediaSharingAllowedState: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT,
pub internetMediaSharingSecurityGroup: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::mem::MaybeUninit<windows_core::BSTR>) -> windows_core::HRESULT,
pub SetinternetMediaSharingSecurityGroup: unsafe extern "system" fn(*mut core::ffi::c_void, core::mem::MaybeUninit<windows_core::BSTR>) -> windows_core::HRESULT,
pub allowSharingToAllDevices: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT,
pub SetallowSharingToAllDevices: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT,
pub setDefaultAuthorization: unsafe extern "system" fn(*mut core::ffi::c_void, core::mem::MaybeUninit<windows_core::BSTR>, core::mem::MaybeUninit<windows_core::BSTR>, super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT,
pub setAuthorizationState: unsafe extern "system" fn(*mut core::ffi::c_void, core::mem::MaybeUninit<windows_core::BSTR>, super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT,
#[cfg(feature = "Win32_System_Com")]
pub getAllDevices: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_System_Com"))]
getAllDevices: usize,
pub customSettingsApplied: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT,
}
pub const DEVICE_AUTHORIZATION_ALLOWED: WindowsMediaLibrarySharingDeviceAuthorizationStatus = WindowsMediaLibrarySharingDeviceAuthorizationStatus(1i32);
pub const DEVICE_AUTHORIZATION_DENIED: WindowsMediaLibrarySharingDeviceAuthorizationStatus = WindowsMediaLibrarySharingDeviceAuthorizationStatus(2i32);
pub const DEVICE_AUTHORIZATION_UNKNOWN: WindowsMediaLibrarySharingDeviceAuthorizationStatus = WindowsMediaLibrarySharingDeviceAuthorizationStatus(0i32);
#[repr(transparent)]
#[derive(PartialEq, Eq, Copy, Clone, Default)]
pub struct WindowsMediaLibrarySharingDeviceAuthorizationStatus(pub i32);
impl windows_core::TypeKind for WindowsMediaLibrarySharingDeviceAuthorizationStatus {
type TypeKind = windows_core::CopyType;
}
impl core::fmt::Debug for WindowsMediaLibrarySharingDeviceAuthorizationStatus {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_tuple("WindowsMediaLibrarySharingDeviceAuthorizationStatus").field(&self.0).finish()
}
}
pub const WindowsMediaLibrarySharingServices: windows_core::GUID = windows_core::GUID::from_u128(0xad581b00_7b64_4e59_a38d_d2c5bf51ddb3);
#[cfg(feature = "implement")]
core::include!("impl.rs");