1 #![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] 2 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)] 3 #[repr(transparent)] 4 pub struct CredentialPromptType(pub i32); 5 impl CredentialPromptType { 6 pub const PromptIfNeeded: CredentialPromptType = CredentialPromptType(0i32); 7 pub const RetypeCredentials: CredentialPromptType = CredentialPromptType(1i32); 8 pub const DoNotPrompt: CredentialPromptType = CredentialPromptType(2i32); 9 } 10 impl ::std::convert::From<i32> for CredentialPromptType { 11 fn from(value: i32) -> Self { 12 Self(value) 13 } 14 } 15 unsafe impl ::windows::runtime::Abi for CredentialPromptType { 16 type Abi = Self; 17 type DefaultType = Self; 18 } 19 unsafe impl ::windows::runtime::RuntimeType for CredentialPromptType { 20 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"enum(Windows.Security.Authentication.OnlineId.CredentialPromptType;i4)"); 21 } 22 #[repr(transparent)] 23 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 24 #[doc(hidden)] 25 pub struct IOnlineIdAuthenticator(::windows::runtime::IInspectable); 26 unsafe impl ::windows::runtime::Interface for IOnlineIdAuthenticator { 27 type Vtable = IOnlineIdAuthenticator_abi; 28 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2684614026, 10667, 18455, [184, 132, 215, 81, 109, 173, 24, 185]); 29 } 30 #[repr(C)] 31 #[doc(hidden)] 32 pub struct IOnlineIdAuthenticator_abi( 33 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 34 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 35 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 36 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 37 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 38 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 39 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, request: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 40 #[cfg(not(feature = "Foundation"))] usize, 41 #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, requests: ::windows::runtime::RawPtr, credentialprompttype: CredentialPromptType, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 42 #[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] usize, 43 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 44 #[cfg(not(feature = "Foundation"))] usize, 45 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, main(int argc,char * argv[])46 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 47 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut bool) -> ::windows::runtime::HRESULT, 48 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 49 ); 50 #[repr(transparent)] 51 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 52 #[doc(hidden)] 53 pub struct IOnlineIdServiceTicket(::windows::runtime::IInspectable); 54 unsafe impl ::windows::runtime::Interface for IOnlineIdServiceTicket { 55 type Vtable = IOnlineIdServiceTicket_abi; 56 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(3378271359, 55169, 19092, [172, 184, 197, 152, 116, 35, 140, 38]); 57 } 58 #[repr(C)] 59 #[doc(hidden)] 60 pub struct IOnlineIdServiceTicket_abi( 61 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 62 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 63 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 64 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 65 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 66 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 67 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 68 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 69 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut i32) -> ::windows::runtime::HRESULT, 70 ); 71 #[repr(transparent)] 72 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 73 #[doc(hidden)] 74 pub struct IOnlineIdServiceTicketRequest(::windows::runtime::IInspectable); 75 unsafe impl ::windows::runtime::Interface for IOnlineIdServiceTicketRequest { 76 type Vtable = IOnlineIdServiceTicketRequest_abi; 77 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(695485907, 64355, 16693, [137, 9, 78, 53, 76, 6, 20, 102]); 78 } 79 #[repr(C)] 80 #[doc(hidden)] 81 pub struct IOnlineIdServiceTicketRequest_abi( 82 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 83 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 84 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 85 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 86 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 87 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 88 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 89 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 90 ); 91 #[repr(transparent)] 92 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 93 #[doc(hidden)] 94 pub struct IOnlineIdServiceTicketRequestFactory(::windows::runtime::IInspectable); 95 unsafe impl ::windows::runtime::Interface for IOnlineIdServiceTicketRequestFactory { 96 type Vtable = IOnlineIdServiceTicketRequestFactory_abi; 97 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(3199928840, 40563, 16503, [150, 20, 8, 97, 76, 11, 194, 69]); 98 } 99 #[repr(C)] 100 #[doc(hidden)] 101 pub struct IOnlineIdServiceTicketRequestFactory_abi( 102 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 103 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 104 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 105 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 106 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 107 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 108 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, service: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, policy: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 109 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, service: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 110 ); 111 #[repr(transparent)] 112 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 113 #[doc(hidden)] 114 pub struct IOnlineIdSystemAuthenticatorForUser(::windows::runtime::IInspectable); 115 unsafe impl ::windows::runtime::Interface for IOnlineIdSystemAuthenticatorForUser { 116 type Vtable = IOnlineIdSystemAuthenticatorForUser_abi; 117 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1469628155, 7652, 16774, [162, 230, 181, 99, 248, 106, 175, 68]); 118 } 119 #[repr(C)] 120 #[doc(hidden)] 121 pub struct IOnlineIdSystemAuthenticatorForUser_abi( 122 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 123 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 124 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 125 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 126 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 127 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 128 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, request: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 129 #[cfg(not(feature = "Foundation"))] usize, 130 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 131 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 132 #[cfg(feature = "System")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 133 #[cfg(not(feature = "System"))] usize, 134 ); 135 #[repr(transparent)] 136 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 137 #[doc(hidden)] 138 pub struct IOnlineIdSystemAuthenticatorStatics(::windows::runtime::IInspectable); 139 unsafe impl ::windows::runtime::Interface for IOnlineIdSystemAuthenticatorStatics { 140 type Vtable = IOnlineIdSystemAuthenticatorStatics_abi; 141 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2231662482, 63028, 16867, [150, 164, 81, 100, 233, 2, 199, 64]); 142 } 143 #[repr(C)] 144 #[doc(hidden)] 145 pub struct IOnlineIdSystemAuthenticatorStatics_abi( 146 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 147 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 148 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 149 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 150 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 151 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 152 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 153 #[cfg(feature = "System")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, user: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 154 #[cfg(not(feature = "System"))] usize, 155 ); 156 #[repr(transparent)] 157 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 158 #[doc(hidden)] 159 pub struct IOnlineIdSystemIdentity(::windows::runtime::IInspectable); 160 unsafe impl ::windows::runtime::Interface for IOnlineIdSystemIdentity { 161 type Vtable = IOnlineIdSystemIdentity_abi; 162 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1950142989, 46794, 17229, [129, 36, 83, 234, 18, 104, 83, 7]); 163 } 164 #[repr(C)] 165 #[doc(hidden)] 166 pub struct IOnlineIdSystemIdentity_abi( 167 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 168 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 169 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 170 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 171 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 172 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 173 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 174 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 175 ); 176 #[repr(transparent)] 177 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 178 #[doc(hidden)] 179 pub struct IOnlineIdSystemTicketResult(::windows::runtime::IInspectable); 180 unsafe impl ::windows::runtime::Interface for IOnlineIdSystemTicketResult { 181 type Vtable = IOnlineIdSystemTicketResult_abi; 182 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(3674890232, 45208, 19149, [157, 19, 158, 100, 6, 82, 181, 182]); 183 } 184 #[repr(C)] 185 #[doc(hidden)] 186 pub struct IOnlineIdSystemTicketResult_abi( 187 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 188 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 189 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 190 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 191 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 192 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 193 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 194 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut OnlineIdSystemTicketStatus) -> ::windows::runtime::HRESULT, 195 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::HRESULT) -> ::windows::runtime::HRESULT, 196 ); 197 #[repr(transparent)] 198 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 199 #[doc(hidden)] 200 pub struct IUserIdentity(::windows::runtime::IInspectable); 201 unsafe impl ::windows::runtime::Interface for IUserIdentity { 202 type Vtable = IUserIdentity_abi; 203 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(558291405, 1858, 19427, [138, 28, 124, 122, 230, 121, 170, 136]); 204 } 205 #[repr(C)] 206 #[doc(hidden)] 207 pub struct IUserIdentity_abi( 208 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 209 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 210 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 211 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 212 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 213 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 214 #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 215 #[cfg(not(feature = "Foundation_Collections"))] usize, 216 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 217 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 218 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 219 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 220 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>) -> ::windows::runtime::HRESULT, 221 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut bool) -> ::windows::runtime::HRESULT, 222 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut bool) -> ::windows::runtime::HRESULT, 223 ); 224 #[repr(transparent)] 225 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 226 pub struct OnlineIdAuthenticator(::windows::runtime::IInspectable); 227 impl OnlineIdAuthenticator { 228 pub fn new() -> ::windows::runtime::Result<Self> { 229 Self::IActivationFactory(|f| f.activate_instance::<Self>()) 230 } 231 fn IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R> { 232 static mut SHARED: ::windows::runtime::FactoryCache<OnlineIdAuthenticator, ::windows::runtime::IActivationFactory> = ::windows::runtime::FactoryCache::new(); 233 unsafe { SHARED.call(callback) } 234 } 235 #[cfg(feature = "Foundation")] 236 pub fn AuthenticateUserAsync<'a, Param0: ::windows::runtime::IntoParam<'a, OnlineIdServiceTicketRequest>>(&self, request: Param0) -> ::windows::runtime::Result<UserAuthenticationOperation> { 237 let this = self; 238 unsafe { 239 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 240 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), request.into_param().abi(), &mut result__).from_abi::<UserAuthenticationOperation>(result__) 241 } 242 } 243 #[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] 244 pub fn AuthenticateUserAsyncAdvanced<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Collections::IIterable<OnlineIdServiceTicketRequest>>>(&self, requests: Param0, credentialprompttype: CredentialPromptType) -> ::windows::runtime::Result<UserAuthenticationOperation> { 245 let this = self; 246 unsafe { 247 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 248 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), requests.into_param().abi(), credentialprompttype, &mut result__).from_abi::<UserAuthenticationOperation>(result__) 249 } 250 } 251 #[cfg(feature = "Foundation")] 252 pub fn SignOutUserAsync(&self) -> ::windows::runtime::Result<SignOutUserOperation> { 253 let this = self; 254 unsafe { 255 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 256 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<SignOutUserOperation>(result__) 257 } 258 } 259 pub fn SetApplicationId<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::GUID>>(&self, value: Param0) -> ::windows::runtime::Result<()> { 260 let this = self; 261 unsafe { (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), value.into_param().abi()).ok() } 262 } 263 pub fn ApplicationId(&self) -> ::windows::runtime::Result<::windows::runtime::GUID> { 264 let this = self; 265 unsafe { 266 let mut result__: ::windows::runtime::GUID = ::std::mem::zeroed(); 267 (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::GUID>(result__) 268 } 269 } 270 pub fn CanSignOut(&self) -> ::windows::runtime::Result<bool> { 271 let this = self; 272 unsafe { 273 let mut result__: bool = ::std::mem::zeroed(); 274 (::windows::runtime::Interface::vtable(this).11)(::std::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) 275 } 276 } 277 pub fn AuthenticatedSafeCustomerId(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 278 let this = self; 279 unsafe { 280 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 281 (::windows::runtime::Interface::vtable(this).12)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 282 } 283 } 284 } 285 unsafe impl ::windows::runtime::RuntimeType for OnlineIdAuthenticator { 286 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Security.Authentication.OnlineId.OnlineIdAuthenticator;{a003f58a-29ab-4817-b884-d7516dad18b9})"); 287 } 288 unsafe impl ::windows::runtime::Interface for OnlineIdAuthenticator { 289 type Vtable = IOnlineIdAuthenticator_abi; 290 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2684614026, 10667, 18455, [184, 132, 215, 81, 109, 173, 24, 185]); 291 } 292 impl ::windows::runtime::RuntimeName for OnlineIdAuthenticator { 293 const NAME: &'static str = "Windows.Security.Authentication.OnlineId.OnlineIdAuthenticator"; 294 } 295 impl ::std::convert::From<OnlineIdAuthenticator> for ::windows::runtime::IUnknown { 296 fn from(value: OnlineIdAuthenticator) -> Self { 297 unsafe { ::std::mem::transmute(value) } 298 } 299 } 300 impl ::std::convert::From<&OnlineIdAuthenticator> for ::windows::runtime::IUnknown { 301 fn from(value: &OnlineIdAuthenticator) -> Self { 302 ::std::convert::From::from(::std::clone::Clone::clone(value)) 303 } 304 } 305 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for OnlineIdAuthenticator { 306 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 307 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 308 } 309 } 310 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &OnlineIdAuthenticator { 311 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 312 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 313 } 314 } 315 impl ::std::convert::From<OnlineIdAuthenticator> for ::windows::runtime::IInspectable { 316 fn from(value: OnlineIdAuthenticator) -> Self { 317 value.0 318 } 319 } 320 impl ::std::convert::From<&OnlineIdAuthenticator> for ::windows::runtime::IInspectable { 321 fn from(value: &OnlineIdAuthenticator) -> Self { 322 value.0.clone() 323 } 324 } 325 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for OnlineIdAuthenticator { 326 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 327 ::windows::runtime::Param::Owned(self.0) 328 } 329 } 330 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a OnlineIdAuthenticator { 331 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 332 ::windows::runtime::Param::Borrowed(&self.0) 333 } 334 } 335 unsafe impl ::std::marker::Send for OnlineIdAuthenticator {} 336 unsafe impl ::std::marker::Sync for OnlineIdAuthenticator {} 337 #[repr(transparent)] 338 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 339 pub struct OnlineIdServiceTicket(::windows::runtime::IInspectable); 340 impl OnlineIdServiceTicket { 341 pub fn Value(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 342 let this = self; 343 unsafe { 344 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 345 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 346 } 347 } 348 pub fn Request(&self) -> ::windows::runtime::Result<OnlineIdServiceTicketRequest> { 349 let this = self; 350 unsafe { 351 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 352 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<OnlineIdServiceTicketRequest>(result__) 353 } 354 } 355 pub fn ErrorCode(&self) -> ::windows::runtime::Result<i32> { 356 let this = self; 357 unsafe { 358 let mut result__: i32 = ::std::mem::zeroed(); 359 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) 360 } 361 } 362 } 363 unsafe impl ::windows::runtime::RuntimeType for OnlineIdServiceTicket { 364 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Security.Authentication.OnlineId.OnlineIdServiceTicket;{c95c547f-d781-4a94-acb8-c59874238c26})"); 365 } 366 unsafe impl ::windows::runtime::Interface for OnlineIdServiceTicket { 367 type Vtable = IOnlineIdServiceTicket_abi; 368 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(3378271359, 55169, 19092, [172, 184, 197, 152, 116, 35, 140, 38]); 369 } 370 impl ::windows::runtime::RuntimeName for OnlineIdServiceTicket { 371 const NAME: &'static str = "Windows.Security.Authentication.OnlineId.OnlineIdServiceTicket"; 372 } 373 impl ::std::convert::From<OnlineIdServiceTicket> for ::windows::runtime::IUnknown { 374 fn from(value: OnlineIdServiceTicket) -> Self { 375 unsafe { ::std::mem::transmute(value) } 376 } 377 } 378 impl ::std::convert::From<&OnlineIdServiceTicket> for ::windows::runtime::IUnknown { 379 fn from(value: &OnlineIdServiceTicket) -> Self { 380 ::std::convert::From::from(::std::clone::Clone::clone(value)) 381 } 382 } 383 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for OnlineIdServiceTicket { 384 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 385 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 386 } 387 } 388 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &OnlineIdServiceTicket { 389 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 390 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 391 } 392 } 393 impl ::std::convert::From<OnlineIdServiceTicket> for ::windows::runtime::IInspectable { 394 fn from(value: OnlineIdServiceTicket) -> Self { 395 value.0 396 } 397 } 398 impl ::std::convert::From<&OnlineIdServiceTicket> for ::windows::runtime::IInspectable { 399 fn from(value: &OnlineIdServiceTicket) -> Self { 400 value.0.clone() 401 } 402 } 403 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for OnlineIdServiceTicket { 404 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 405 ::windows::runtime::Param::Owned(self.0) 406 } 407 } 408 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a OnlineIdServiceTicket { 409 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 410 ::windows::runtime::Param::Borrowed(&self.0) 411 } 412 } 413 unsafe impl ::std::marker::Send for OnlineIdServiceTicket {} 414 unsafe impl ::std::marker::Sync for OnlineIdServiceTicket {} 415 #[repr(transparent)] 416 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 417 pub struct OnlineIdServiceTicketRequest(::windows::runtime::IInspectable); 418 impl OnlineIdServiceTicketRequest { 419 pub fn Service(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 420 let this = self; 421 unsafe { 422 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 423 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 424 } 425 } 426 pub fn Policy(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 427 let this = self; 428 unsafe { 429 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 430 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 431 } 432 } 433 pub fn CreateOnlineIdServiceTicketRequest<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(service: Param0, policy: Param1) -> ::windows::runtime::Result<OnlineIdServiceTicketRequest> { 434 Self::IOnlineIdServiceTicketRequestFactory(|this| unsafe { 435 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 436 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), service.into_param().abi(), policy.into_param().abi(), &mut result__).from_abi::<OnlineIdServiceTicketRequest>(result__) 437 }) 438 } 439 pub fn CreateOnlineIdServiceTicketRequestAdvanced<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>>(service: Param0) -> ::windows::runtime::Result<OnlineIdServiceTicketRequest> { 440 Self::IOnlineIdServiceTicketRequestFactory(|this| unsafe { 441 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 442 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), service.into_param().abi(), &mut result__).from_abi::<OnlineIdServiceTicketRequest>(result__) 443 }) 444 } 445 pub fn IOnlineIdServiceTicketRequestFactory<R, F: FnOnce(&IOnlineIdServiceTicketRequestFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R> { 446 static mut SHARED: ::windows::runtime::FactoryCache<OnlineIdServiceTicketRequest, IOnlineIdServiceTicketRequestFactory> = ::windows::runtime::FactoryCache::new(); 447 unsafe { SHARED.call(callback) } 448 } 449 } 450 unsafe impl ::windows::runtime::RuntimeType for OnlineIdServiceTicketRequest { 451 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Security.Authentication.OnlineId.OnlineIdServiceTicketRequest;{297445d3-fb63-4135-8909-4e354c061466})"); 452 } 453 unsafe impl ::windows::runtime::Interface for OnlineIdServiceTicketRequest { 454 type Vtable = IOnlineIdServiceTicketRequest_abi; 455 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(695485907, 64355, 16693, [137, 9, 78, 53, 76, 6, 20, 102]); 456 } 457 impl ::windows::runtime::RuntimeName for OnlineIdServiceTicketRequest { 458 const NAME: &'static str = "Windows.Security.Authentication.OnlineId.OnlineIdServiceTicketRequest"; 459 } 460 impl ::std::convert::From<OnlineIdServiceTicketRequest> for ::windows::runtime::IUnknown { 461 fn from(value: OnlineIdServiceTicketRequest) -> Self { 462 unsafe { ::std::mem::transmute(value) } 463 } 464 } 465 impl ::std::convert::From<&OnlineIdServiceTicketRequest> for ::windows::runtime::IUnknown { 466 fn from(value: &OnlineIdServiceTicketRequest) -> Self { 467 ::std::convert::From::from(::std::clone::Clone::clone(value)) 468 } 469 } 470 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for OnlineIdServiceTicketRequest { 471 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 472 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 473 } 474 } 475 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &OnlineIdServiceTicketRequest { 476 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 477 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 478 } 479 } 480 impl ::std::convert::From<OnlineIdServiceTicketRequest> for ::windows::runtime::IInspectable { 481 fn from(value: OnlineIdServiceTicketRequest) -> Self { 482 value.0 483 } 484 } 485 impl ::std::convert::From<&OnlineIdServiceTicketRequest> for ::windows::runtime::IInspectable { 486 fn from(value: &OnlineIdServiceTicketRequest) -> Self { 487 value.0.clone() 488 } 489 } 490 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for OnlineIdServiceTicketRequest { 491 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 492 ::windows::runtime::Param::Owned(self.0) 493 } 494 } 495 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a OnlineIdServiceTicketRequest { 496 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 497 ::windows::runtime::Param::Borrowed(&self.0) 498 } 499 } 500 unsafe impl ::std::marker::Send for OnlineIdServiceTicketRequest {} 501 unsafe impl ::std::marker::Sync for OnlineIdServiceTicketRequest {} 502 pub struct OnlineIdSystemAuthenticator {} 503 impl OnlineIdSystemAuthenticator { 504 pub fn Default() -> ::windows::runtime::Result<OnlineIdSystemAuthenticatorForUser> { 505 Self::IOnlineIdSystemAuthenticatorStatics(|this| unsafe { 506 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 507 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<OnlineIdSystemAuthenticatorForUser>(result__) 508 }) 509 } 510 #[cfg(feature = "System")] 511 pub fn GetForUser<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::System::User>>(user: Param0) -> ::windows::runtime::Result<OnlineIdSystemAuthenticatorForUser> { 512 Self::IOnlineIdSystemAuthenticatorStatics(|this| unsafe { 513 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 514 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), user.into_param().abi(), &mut result__).from_abi::<OnlineIdSystemAuthenticatorForUser>(result__) 515 }) 516 } 517 pub fn IOnlineIdSystemAuthenticatorStatics<R, F: FnOnce(&IOnlineIdSystemAuthenticatorStatics) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R> { 518 static mut SHARED: ::windows::runtime::FactoryCache<OnlineIdSystemAuthenticator, IOnlineIdSystemAuthenticatorStatics> = ::windows::runtime::FactoryCache::new(); 519 unsafe { SHARED.call(callback) } 520 } 521 } 522 impl ::windows::runtime::RuntimeName for OnlineIdSystemAuthenticator { 523 const NAME: &'static str = "Windows.Security.Authentication.OnlineId.OnlineIdSystemAuthenticator"; 524 } 525 #[repr(transparent)] 526 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 527 pub struct OnlineIdSystemAuthenticatorForUser(::windows::runtime::IInspectable); 528 impl OnlineIdSystemAuthenticatorForUser { 529 #[cfg(feature = "Foundation")] 530 pub fn GetTicketAsync<'a, Param0: ::windows::runtime::IntoParam<'a, OnlineIdServiceTicketRequest>>(&self, request: Param0) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<OnlineIdSystemTicketResult>> { 531 let this = self; 532 unsafe { 533 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 534 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), request.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::IAsyncOperation<OnlineIdSystemTicketResult>>(result__) 535 } 536 } 537 pub fn SetApplicationId<'a, Param0: ::windows::runtime::IntoParam<'a, ::windows::runtime::GUID>>(&self, value: Param0) -> ::windows::runtime::Result<()> { 538 let this = self; 539 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value.into_param().abi()).ok() } 540 } 541 pub fn ApplicationId(&self) -> ::windows::runtime::Result<::windows::runtime::GUID> { 542 let this = self; 543 unsafe { 544 let mut result__: ::windows::runtime::GUID = ::std::mem::zeroed(); 545 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::GUID>(result__) 546 } 547 } 548 #[cfg(feature = "System")] 549 pub fn User(&self) -> ::windows::runtime::Result<super::super::super::System::User> { 550 let this = self; 551 unsafe { 552 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 553 (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), &mut result__).from_abi::<super::super::super::System::User>(result__) 554 } 555 } 556 } 557 unsafe impl ::windows::runtime::RuntimeType for OnlineIdSystemAuthenticatorForUser { 558 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Security.Authentication.OnlineId.OnlineIdSystemAuthenticatorForUser;{5798befb-1de4-4186-a2e6-b563f86aaf44})"); 559 } 560 unsafe impl ::windows::runtime::Interface for OnlineIdSystemAuthenticatorForUser { 561 type Vtable = IOnlineIdSystemAuthenticatorForUser_abi; 562 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1469628155, 7652, 16774, [162, 230, 181, 99, 248, 106, 175, 68]); 563 } 564 impl ::windows::runtime::RuntimeName for OnlineIdSystemAuthenticatorForUser { 565 const NAME: &'static str = "Windows.Security.Authentication.OnlineId.OnlineIdSystemAuthenticatorForUser"; 566 } 567 impl ::std::convert::From<OnlineIdSystemAuthenticatorForUser> for ::windows::runtime::IUnknown { 568 fn from(value: OnlineIdSystemAuthenticatorForUser) -> Self { 569 unsafe { ::std::mem::transmute(value) } 570 } 571 } 572 impl ::std::convert::From<&OnlineIdSystemAuthenticatorForUser> for ::windows::runtime::IUnknown { 573 fn from(value: &OnlineIdSystemAuthenticatorForUser) -> Self { 574 ::std::convert::From::from(::std::clone::Clone::clone(value)) 575 } 576 } 577 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for OnlineIdSystemAuthenticatorForUser { 578 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 579 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 580 } 581 } 582 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &OnlineIdSystemAuthenticatorForUser { 583 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 584 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 585 } 586 } 587 impl ::std::convert::From<OnlineIdSystemAuthenticatorForUser> for ::windows::runtime::IInspectable { 588 fn from(value: OnlineIdSystemAuthenticatorForUser) -> Self { 589 value.0 590 } 591 } 592 impl ::std::convert::From<&OnlineIdSystemAuthenticatorForUser> for ::windows::runtime::IInspectable { 593 fn from(value: &OnlineIdSystemAuthenticatorForUser) -> Self { 594 value.0.clone() 595 } 596 } 597 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for OnlineIdSystemAuthenticatorForUser { 598 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 599 ::windows::runtime::Param::Owned(self.0) 600 } 601 } 602 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a OnlineIdSystemAuthenticatorForUser { 603 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 604 ::windows::runtime::Param::Borrowed(&self.0) 605 } 606 } 607 unsafe impl ::std::marker::Send for OnlineIdSystemAuthenticatorForUser {} 608 unsafe impl ::std::marker::Sync for OnlineIdSystemAuthenticatorForUser {} 609 #[repr(transparent)] 610 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 611 pub struct OnlineIdSystemIdentity(::windows::runtime::IInspectable); 612 impl OnlineIdSystemIdentity { 613 pub fn Ticket(&self) -> ::windows::runtime::Result<OnlineIdServiceTicket> { 614 let this = self; 615 unsafe { 616 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 617 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<OnlineIdServiceTicket>(result__) 618 } 619 } 620 pub fn Id(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 621 let this = self; 622 unsafe { 623 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 624 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 625 } 626 } 627 } 628 unsafe impl ::windows::runtime::RuntimeType for OnlineIdSystemIdentity { 629 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Security.Authentication.OnlineId.OnlineIdSystemIdentity;{743cd20d-b6ca-434d-8124-53ea12685307})"); 630 } 631 unsafe impl ::windows::runtime::Interface for OnlineIdSystemIdentity { 632 type Vtable = IOnlineIdSystemIdentity_abi; 633 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1950142989, 46794, 17229, [129, 36, 83, 234, 18, 104, 83, 7]); 634 } 635 impl ::windows::runtime::RuntimeName for OnlineIdSystemIdentity { 636 const NAME: &'static str = "Windows.Security.Authentication.OnlineId.OnlineIdSystemIdentity"; 637 } 638 impl ::std::convert::From<OnlineIdSystemIdentity> for ::windows::runtime::IUnknown { 639 fn from(value: OnlineIdSystemIdentity) -> Self { 640 unsafe { ::std::mem::transmute(value) } 641 } 642 } 643 impl ::std::convert::From<&OnlineIdSystemIdentity> for ::windows::runtime::IUnknown { 644 fn from(value: &OnlineIdSystemIdentity) -> Self { 645 ::std::convert::From::from(::std::clone::Clone::clone(value)) 646 } 647 } 648 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for OnlineIdSystemIdentity { 649 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 650 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 651 } 652 } 653 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &OnlineIdSystemIdentity { 654 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 655 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 656 } 657 } 658 impl ::std::convert::From<OnlineIdSystemIdentity> for ::windows::runtime::IInspectable { 659 fn from(value: OnlineIdSystemIdentity) -> Self { 660 value.0 661 } 662 } 663 impl ::std::convert::From<&OnlineIdSystemIdentity> for ::windows::runtime::IInspectable { 664 fn from(value: &OnlineIdSystemIdentity) -> Self { 665 value.0.clone() 666 } 667 } 668 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for OnlineIdSystemIdentity { 669 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 670 ::windows::runtime::Param::Owned(self.0) 671 } 672 } 673 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a OnlineIdSystemIdentity { 674 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 675 ::windows::runtime::Param::Borrowed(&self.0) 676 } 677 } 678 unsafe impl ::std::marker::Send for OnlineIdSystemIdentity {} 679 unsafe impl ::std::marker::Sync for OnlineIdSystemIdentity {} 680 #[repr(transparent)] 681 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 682 pub struct OnlineIdSystemTicketResult(::windows::runtime::IInspectable); 683 impl OnlineIdSystemTicketResult { 684 pub fn Identity(&self) -> ::windows::runtime::Result<OnlineIdSystemIdentity> { 685 let this = self; 686 unsafe { 687 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 688 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<OnlineIdSystemIdentity>(result__) 689 } 690 } 691 pub fn Status(&self) -> ::windows::runtime::Result<OnlineIdSystemTicketStatus> { 692 let this = self; 693 unsafe { 694 let mut result__: OnlineIdSystemTicketStatus = ::std::mem::zeroed(); 695 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<OnlineIdSystemTicketStatus>(result__) 696 } 697 } 698 pub fn ExtendedError(&self) -> ::windows::runtime::Result<::windows::runtime::HRESULT> { 699 let this = self; 700 unsafe { 701 let mut result__: ::windows::runtime::HRESULT = ::std::mem::zeroed(); 702 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HRESULT>(result__) 703 } 704 } 705 } 706 unsafe impl ::windows::runtime::RuntimeType for OnlineIdSystemTicketResult { 707 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Security.Authentication.OnlineId.OnlineIdSystemTicketResult;{db0a5ff8-b098-4acd-9d13-9e640652b5b6})"); 708 } 709 unsafe impl ::windows::runtime::Interface for OnlineIdSystemTicketResult { 710 type Vtable = IOnlineIdSystemTicketResult_abi; 711 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(3674890232, 45208, 19149, [157, 19, 158, 100, 6, 82, 181, 182]); 712 } 713 impl ::windows::runtime::RuntimeName for OnlineIdSystemTicketResult { 714 const NAME: &'static str = "Windows.Security.Authentication.OnlineId.OnlineIdSystemTicketResult"; 715 } 716 impl ::std::convert::From<OnlineIdSystemTicketResult> for ::windows::runtime::IUnknown { 717 fn from(value: OnlineIdSystemTicketResult) -> Self { 718 unsafe { ::std::mem::transmute(value) } 719 } 720 } 721 impl ::std::convert::From<&OnlineIdSystemTicketResult> for ::windows::runtime::IUnknown { 722 fn from(value: &OnlineIdSystemTicketResult) -> Self { 723 ::std::convert::From::from(::std::clone::Clone::clone(value)) 724 } 725 } 726 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for OnlineIdSystemTicketResult { 727 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 728 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 729 } 730 } 731 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &OnlineIdSystemTicketResult { 732 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 733 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 734 } 735 } 736 impl ::std::convert::From<OnlineIdSystemTicketResult> for ::windows::runtime::IInspectable { 737 fn from(value: OnlineIdSystemTicketResult) -> Self { 738 value.0 739 } 740 } 741 impl ::std::convert::From<&OnlineIdSystemTicketResult> for ::windows::runtime::IInspectable { 742 fn from(value: &OnlineIdSystemTicketResult) -> Self { 743 value.0.clone() 744 } 745 } 746 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for OnlineIdSystemTicketResult { 747 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 748 ::windows::runtime::Param::Owned(self.0) 749 } 750 } 751 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a OnlineIdSystemTicketResult { 752 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 753 ::windows::runtime::Param::Borrowed(&self.0) 754 } 755 } 756 unsafe impl ::std::marker::Send for OnlineIdSystemTicketResult {} 757 unsafe impl ::std::marker::Sync for OnlineIdSystemTicketResult {} 758 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)] 759 #[repr(transparent)] 760 pub struct OnlineIdSystemTicketStatus(pub i32); 761 impl OnlineIdSystemTicketStatus { 762 pub const Success: OnlineIdSystemTicketStatus = OnlineIdSystemTicketStatus(0i32); 763 pub const Error: OnlineIdSystemTicketStatus = OnlineIdSystemTicketStatus(1i32); 764 pub const ServiceConnectionError: OnlineIdSystemTicketStatus = OnlineIdSystemTicketStatus(2i32); 765 } 766 impl ::std::convert::From<i32> for OnlineIdSystemTicketStatus { 767 fn from(value: i32) -> Self { 768 Self(value) 769 } 770 } 771 unsafe impl ::windows::runtime::Abi for OnlineIdSystemTicketStatus { 772 type Abi = Self; 773 type DefaultType = Self; 774 } 775 unsafe impl ::windows::runtime::RuntimeType for OnlineIdSystemTicketStatus { 776 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"enum(Windows.Security.Authentication.OnlineId.OnlineIdSystemTicketStatus;i4)"); 777 } 778 #[cfg(feature = "Foundation")] 779 #[repr(transparent)] 780 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 781 pub struct SignOutUserOperation(::windows::runtime::IInspectable); 782 #[cfg(feature = "Foundation")] 783 impl SignOutUserOperation { 784 #[cfg(feature = "Foundation")] 785 pub fn SetCompleted<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::AsyncActionCompletedHandler>>(&self, handler: Param0) -> ::windows::runtime::Result<()> { 786 let this = self; 787 unsafe { (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), handler.into_param().abi()).ok() } 788 } 789 #[cfg(feature = "Foundation")] 790 pub fn Completed(&self) -> ::windows::runtime::Result<super::super::super::Foundation::AsyncActionCompletedHandler> { 791 let this = self; 792 unsafe { 793 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 794 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<super::super::super::Foundation::AsyncActionCompletedHandler>(result__) 795 } 796 } 797 #[cfg(feature = "Foundation")] 798 pub fn GetResults(&self) -> ::windows::runtime::Result<()> { 799 let this = self; 800 unsafe { (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this)).ok() } 801 } 802 #[cfg(feature = "Foundation")] 803 pub fn Id(&self) -> ::windows::runtime::Result<u32> { 804 let this = &::windows::runtime::Interface::cast::<super::super::super::Foundation::IAsyncInfo>(self)?; 805 unsafe { 806 let mut result__: u32 = ::std::mem::zeroed(); 807 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) 808 } 809 } 810 #[cfg(feature = "Foundation")] 811 pub fn Status(&self) -> ::windows::runtime::Result<super::super::super::Foundation::AsyncStatus> { 812 let this = &::windows::runtime::Interface::cast::<super::super::super::Foundation::IAsyncInfo>(self)?; 813 unsafe { 814 let mut result__: super::super::super::Foundation::AsyncStatus = ::std::mem::zeroed(); 815 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<super::super::super::Foundation::AsyncStatus>(result__) 816 } 817 } 818 #[cfg(feature = "Foundation")] 819 pub fn ErrorCode(&self) -> ::windows::runtime::Result<::windows::runtime::HRESULT> { 820 let this = &::windows::runtime::Interface::cast::<super::super::super::Foundation::IAsyncInfo>(self)?; 821 unsafe { 822 let mut result__: ::windows::runtime::HRESULT = ::std::mem::zeroed(); 823 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HRESULT>(result__) 824 } 825 } 826 #[cfg(feature = "Foundation")] 827 pub fn Cancel(&self) -> ::windows::runtime::Result<()> { 828 let this = &::windows::runtime::Interface::cast::<super::super::super::Foundation::IAsyncInfo>(self)?; 829 unsafe { (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this)).ok() } 830 } 831 #[cfg(feature = "Foundation")] 832 pub fn Close(&self) -> ::windows::runtime::Result<()> { 833 let this = &::windows::runtime::Interface::cast::<super::super::super::Foundation::IAsyncInfo>(self)?; 834 unsafe { (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this)).ok() } 835 } 836 pub fn get(&self) -> ::windows::runtime::Result<()> { 837 if self.Status()? == super::super::super::Foundation::AsyncStatus::Started { 838 let (waiter, signaler) = ::windows::runtime::Waiter::new(); 839 self.SetCompleted(super::super::super::Foundation::AsyncActionCompletedHandler::new(move |_sender, _args| { 840 unsafe { 841 signaler.signal(); 842 } 843 Ok(()) 844 }))?; 845 } 846 self.GetResults() 847 } 848 } 849 #[cfg(feature = "Foundation")] 850 unsafe impl ::windows::runtime::RuntimeType for SignOutUserOperation { 851 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Security.Authentication.OnlineId.SignOutUserOperation;{5a648006-843a-4da9-865b-9d26e5dfad7b})"); 852 } 853 #[cfg(feature = "Foundation")] 854 unsafe impl ::windows::runtime::Interface for SignOutUserOperation { 855 type Vtable = super::super::super::Foundation::IAsyncAction_abi; 856 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1516535814, 33850, 19881, [134, 91, 157, 38, 229, 223, 173, 123]); 857 } 858 #[cfg(feature = "Foundation")] 859 impl ::windows::runtime::RuntimeName for SignOutUserOperation { 860 const NAME: &'static str = "Windows.Security.Authentication.OnlineId.SignOutUserOperation"; 861 } 862 impl ::std::future::Future for SignOutUserOperation { 863 type Output = ::windows::runtime::Result<()>; 864 fn poll(self: ::std::pin::Pin<&mut Self>, context: &mut ::std::task::Context) -> ::std::task::Poll<Self::Output> { 865 if self.Status()? == super::super::super::Foundation::AsyncStatus::Started { 866 let waker = context.waker().clone(); 867 let _ = self.SetCompleted(super::super::super::Foundation::AsyncActionCompletedHandler::new(move |_sender, _args| { 868 waker.wake_by_ref(); 869 Ok(()) 870 })); 871 ::std::task::Poll::Pending 872 } else { 873 ::std::task::Poll::Ready(self.GetResults()) 874 } 875 } 876 } 877 #[cfg(feature = "Foundation")] 878 impl ::std::convert::From<SignOutUserOperation> for ::windows::runtime::IUnknown { 879 fn from(value: SignOutUserOperation) -> Self { 880 unsafe { ::std::mem::transmute(value) } 881 } 882 } 883 #[cfg(feature = "Foundation")] 884 impl ::std::convert::From<&SignOutUserOperation> for ::windows::runtime::IUnknown { 885 fn from(value: &SignOutUserOperation) -> Self { 886 ::std::convert::From::from(::std::clone::Clone::clone(value)) 887 } 888 } 889 #[cfg(feature = "Foundation")] 890 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for SignOutUserOperation { 891 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 892 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 893 } 894 } 895 #[cfg(feature = "Foundation")] 896 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &SignOutUserOperation { 897 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 898 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 899 } 900 } 901 #[cfg(feature = "Foundation")] 902 impl ::std::convert::From<SignOutUserOperation> for ::windows::runtime::IInspectable { 903 fn from(value: SignOutUserOperation) -> Self { 904 value.0 905 } 906 } 907 #[cfg(feature = "Foundation")] 908 impl ::std::convert::From<&SignOutUserOperation> for ::windows::runtime::IInspectable { 909 fn from(value: &SignOutUserOperation) -> Self { 910 value.0.clone() 911 } 912 } 913 #[cfg(feature = "Foundation")] 914 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for SignOutUserOperation { 915 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 916 ::windows::runtime::Param::Owned(self.0) 917 } 918 } 919 #[cfg(feature = "Foundation")] 920 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a SignOutUserOperation { 921 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 922 ::windows::runtime::Param::Borrowed(&self.0) 923 } 924 } 925 #[cfg(feature = "Foundation")] 926 impl ::std::convert::From<SignOutUserOperation> for super::super::super::Foundation::IAsyncAction { 927 fn from(value: SignOutUserOperation) -> Self { 928 unsafe { ::std::mem::transmute(value) } 929 } 930 } 931 #[cfg(feature = "Foundation")] 932 impl ::std::convert::From<&SignOutUserOperation> for super::super::super::Foundation::IAsyncAction { 933 fn from(value: &SignOutUserOperation) -> Self { 934 ::std::convert::From::from(::std::clone::Clone::clone(value)) 935 } 936 } 937 #[cfg(feature = "Foundation")] 938 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::IAsyncAction> for SignOutUserOperation { 939 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IAsyncAction> { 940 ::windows::runtime::Param::Owned(::std::convert::Into::<super::super::super::Foundation::IAsyncAction>::into(self)) 941 } 942 } 943 #[cfg(feature = "Foundation")] 944 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::IAsyncAction> for &SignOutUserOperation { 945 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IAsyncAction> { 946 ::windows::runtime::Param::Owned(::std::convert::Into::<super::super::super::Foundation::IAsyncAction>::into(::std::clone::Clone::clone(self))) 947 } 948 } 949 #[cfg(feature = "Foundation")] 950 impl ::std::convert::TryFrom<SignOutUserOperation> for super::super::super::Foundation::IAsyncInfo { 951 type Error = ::windows::runtime::Error; 952 fn try_from(value: SignOutUserOperation) -> ::windows::runtime::Result<Self> { 953 ::std::convert::TryFrom::try_from(&value) 954 } 955 } 956 #[cfg(feature = "Foundation")] 957 impl ::std::convert::TryFrom<&SignOutUserOperation> for super::super::super::Foundation::IAsyncInfo { 958 type Error = ::windows::runtime::Error; 959 fn try_from(value: &SignOutUserOperation) -> ::windows::runtime::Result<Self> { 960 ::windows::runtime::Interface::cast(value) 961 } 962 } 963 #[cfg(feature = "Foundation")] 964 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::IAsyncInfo> for SignOutUserOperation { 965 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IAsyncInfo> { 966 ::windows::runtime::IntoParam::into_param(&self) 967 } 968 } 969 #[cfg(feature = "Foundation")] 970 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::IAsyncInfo> for &SignOutUserOperation { 971 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IAsyncInfo> { 972 ::std::convert::TryInto::<super::super::super::Foundation::IAsyncInfo>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 973 } 974 } 975 #[cfg(feature = "Foundation")] 976 unsafe impl ::std::marker::Send for SignOutUserOperation {} 977 #[cfg(feature = "Foundation")] 978 unsafe impl ::std::marker::Sync for SignOutUserOperation {} 979 #[cfg(feature = "Foundation")] 980 #[repr(transparent)] 981 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 982 pub struct UserAuthenticationOperation(::windows::runtime::IInspectable); 983 #[cfg(feature = "Foundation")] 984 impl UserAuthenticationOperation { 985 #[cfg(feature = "Foundation")] 986 pub fn SetCompleted<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::AsyncOperationCompletedHandler<UserIdentity>>>(&self, handler: Param0) -> ::windows::runtime::Result<()> { 987 let this = self; 988 unsafe { (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), handler.into_param().abi()).ok() } 989 } 990 #[cfg(feature = "Foundation")] 991 pub fn Completed(&self) -> ::windows::runtime::Result<super::super::super::Foundation::AsyncOperationCompletedHandler<UserIdentity>> { 992 let this = self; 993 unsafe { 994 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 995 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<super::super::super::Foundation::AsyncOperationCompletedHandler<UserIdentity>>(result__) 996 } 997 } 998 #[cfg(feature = "Foundation")] 999 pub fn GetResults(&self) -> ::windows::runtime::Result<UserIdentity> { 1000 let this = self; 1001 unsafe { 1002 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 1003 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<UserIdentity>(result__) 1004 } 1005 } 1006 #[cfg(feature = "Foundation")] 1007 pub fn Id(&self) -> ::windows::runtime::Result<u32> { 1008 let this = &::windows::runtime::Interface::cast::<super::super::super::Foundation::IAsyncInfo>(self)?; 1009 unsafe { 1010 let mut result__: u32 = ::std::mem::zeroed(); 1011 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__) 1012 } 1013 } 1014 #[cfg(feature = "Foundation")] 1015 pub fn Status(&self) -> ::windows::runtime::Result<super::super::super::Foundation::AsyncStatus> { 1016 let this = &::windows::runtime::Interface::cast::<super::super::super::Foundation::IAsyncInfo>(self)?; 1017 unsafe { 1018 let mut result__: super::super::super::Foundation::AsyncStatus = ::std::mem::zeroed(); 1019 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<super::super::super::Foundation::AsyncStatus>(result__) 1020 } 1021 } 1022 #[cfg(feature = "Foundation")] 1023 pub fn ErrorCode(&self) -> ::windows::runtime::Result<::windows::runtime::HRESULT> { 1024 let this = &::windows::runtime::Interface::cast::<super::super::super::Foundation::IAsyncInfo>(self)?; 1025 unsafe { 1026 let mut result__: ::windows::runtime::HRESULT = ::std::mem::zeroed(); 1027 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HRESULT>(result__) 1028 } 1029 } 1030 #[cfg(feature = "Foundation")] 1031 pub fn Cancel(&self) -> ::windows::runtime::Result<()> { 1032 let this = &::windows::runtime::Interface::cast::<super::super::super::Foundation::IAsyncInfo>(self)?; 1033 unsafe { (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this)).ok() } 1034 } 1035 #[cfg(feature = "Foundation")] 1036 pub fn Close(&self) -> ::windows::runtime::Result<()> { 1037 let this = &::windows::runtime::Interface::cast::<super::super::super::Foundation::IAsyncInfo>(self)?; 1038 unsafe { (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this)).ok() } 1039 } 1040 pub fn get(&self) -> ::windows::runtime::Result<UserIdentity> { 1041 if self.Status()? == super::super::super::Foundation::AsyncStatus::Started { 1042 let (waiter, signaler) = ::windows::runtime::Waiter::new(); 1043 self.SetCompleted(super::super::super::Foundation::AsyncOperationCompletedHandler::new(move |_sender, _args| { 1044 unsafe { 1045 signaler.signal(); 1046 } 1047 Ok(()) 1048 }))?; 1049 } 1050 self.GetResults() 1051 } 1052 } 1053 #[cfg(feature = "Foundation")] 1054 unsafe impl ::windows::runtime::RuntimeType for UserAuthenticationOperation { 1055 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Security.Authentication.OnlineId.UserAuthenticationOperation;pinterface({9fc2b0bb-e446-44e2-aa61-9cab8f636af2};rc(Windows.Security.Authentication.OnlineId.UserIdentity;{2146d9cd-0742-4be3-8a1c-7c7ae679aa88})))"); 1056 } 1057 #[cfg(feature = "Foundation")] 1058 unsafe impl ::windows::runtime::Interface for UserAuthenticationOperation { 1059 type Vtable = super::super::super::Foundation::IAsyncOperation_abi<UserIdentity>; 1060 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_signature(<super::super::super::Foundation::IAsyncOperation<UserIdentity> as ::windows::runtime::RuntimeType>::SIGNATURE); 1061 } 1062 #[cfg(feature = "Foundation")] 1063 impl ::windows::runtime::RuntimeName for UserAuthenticationOperation { 1064 const NAME: &'static str = "Windows.Security.Authentication.OnlineId.UserAuthenticationOperation"; 1065 } 1066 impl ::std::future::Future for UserAuthenticationOperation { 1067 type Output = ::windows::runtime::Result<UserIdentity>; 1068 fn poll(self: ::std::pin::Pin<&mut Self>, context: &mut ::std::task::Context) -> ::std::task::Poll<Self::Output> { 1069 if self.Status()? == super::super::super::Foundation::AsyncStatus::Started { 1070 let waker = context.waker().clone(); 1071 let _ = self.SetCompleted(super::super::super::Foundation::AsyncOperationCompletedHandler::new(move |_sender, _args| { 1072 waker.wake_by_ref(); 1073 Ok(()) 1074 })); 1075 ::std::task::Poll::Pending 1076 } else { 1077 ::std::task::Poll::Ready(self.GetResults()) 1078 } 1079 } 1080 } 1081 #[cfg(feature = "Foundation")] 1082 impl ::std::convert::From<UserAuthenticationOperation> for ::windows::runtime::IUnknown { 1083 fn from(value: UserAuthenticationOperation) -> Self { 1084 unsafe { ::std::mem::transmute(value) } 1085 } 1086 } 1087 #[cfg(feature = "Foundation")] 1088 impl ::std::convert::From<&UserAuthenticationOperation> for ::windows::runtime::IUnknown { 1089 fn from(value: &UserAuthenticationOperation) -> Self { 1090 ::std::convert::From::from(::std::clone::Clone::clone(value)) 1091 } 1092 } 1093 #[cfg(feature = "Foundation")] 1094 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for UserAuthenticationOperation { 1095 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 1096 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 1097 } 1098 } 1099 #[cfg(feature = "Foundation")] 1100 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &UserAuthenticationOperation { 1101 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 1102 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 1103 } 1104 } 1105 #[cfg(feature = "Foundation")] 1106 impl ::std::convert::From<UserAuthenticationOperation> for ::windows::runtime::IInspectable { 1107 fn from(value: UserAuthenticationOperation) -> Self { 1108 value.0 1109 } 1110 } 1111 #[cfg(feature = "Foundation")] 1112 impl ::std::convert::From<&UserAuthenticationOperation> for ::windows::runtime::IInspectable { 1113 fn from(value: &UserAuthenticationOperation) -> Self { 1114 value.0.clone() 1115 } 1116 } 1117 #[cfg(feature = "Foundation")] 1118 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for UserAuthenticationOperation { 1119 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1120 ::windows::runtime::Param::Owned(self.0) 1121 } 1122 } 1123 #[cfg(feature = "Foundation")] 1124 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a UserAuthenticationOperation { 1125 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1126 ::windows::runtime::Param::Borrowed(&self.0) 1127 } 1128 } 1129 #[cfg(feature = "Foundation")] 1130 impl ::std::convert::From<UserAuthenticationOperation> for super::super::super::Foundation::IAsyncOperation<UserIdentity> { 1131 fn from(value: UserAuthenticationOperation) -> Self { 1132 unsafe { ::std::mem::transmute(value) } 1133 } 1134 } 1135 #[cfg(feature = "Foundation")] 1136 impl ::std::convert::From<&UserAuthenticationOperation> for super::super::super::Foundation::IAsyncOperation<UserIdentity> { 1137 fn from(value: &UserAuthenticationOperation) -> Self { 1138 ::std::convert::From::from(::std::clone::Clone::clone(value)) 1139 } 1140 } 1141 #[cfg(feature = "Foundation")] 1142 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::IAsyncOperation<UserIdentity>> for UserAuthenticationOperation { 1143 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IAsyncOperation<UserIdentity>> { 1144 ::windows::runtime::Param::Owned(::std::convert::Into::<super::super::super::Foundation::IAsyncOperation<UserIdentity>>::into(self)) 1145 } 1146 } 1147 #[cfg(feature = "Foundation")] 1148 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::IAsyncOperation<UserIdentity>> for &UserAuthenticationOperation { 1149 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IAsyncOperation<UserIdentity>> { 1150 ::windows::runtime::Param::Owned(::std::convert::Into::<super::super::super::Foundation::IAsyncOperation<UserIdentity>>::into(::std::clone::Clone::clone(self))) 1151 } 1152 } 1153 #[cfg(feature = "Foundation")] 1154 impl ::std::convert::TryFrom<UserAuthenticationOperation> for super::super::super::Foundation::IAsyncInfo { 1155 type Error = ::windows::runtime::Error; 1156 fn try_from(value: UserAuthenticationOperation) -> ::windows::runtime::Result<Self> { 1157 ::std::convert::TryFrom::try_from(&value) 1158 } 1159 } 1160 #[cfg(feature = "Foundation")] 1161 impl ::std::convert::TryFrom<&UserAuthenticationOperation> for super::super::super::Foundation::IAsyncInfo { 1162 type Error = ::windows::runtime::Error; 1163 fn try_from(value: &UserAuthenticationOperation) -> ::windows::runtime::Result<Self> { 1164 ::windows::runtime::Interface::cast(value) 1165 } 1166 } 1167 #[cfg(feature = "Foundation")] 1168 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::IAsyncInfo> for UserAuthenticationOperation { 1169 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IAsyncInfo> { 1170 ::windows::runtime::IntoParam::into_param(&self) 1171 } 1172 } 1173 #[cfg(feature = "Foundation")] 1174 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::Foundation::IAsyncInfo> for &UserAuthenticationOperation { 1175 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::Foundation::IAsyncInfo> { 1176 ::std::convert::TryInto::<super::super::super::Foundation::IAsyncInfo>::try_into(self).map(::windows::runtime::Param::Owned).unwrap_or(::windows::runtime::Param::None) 1177 } 1178 } 1179 #[cfg(feature = "Foundation")] 1180 unsafe impl ::std::marker::Send for UserAuthenticationOperation {} 1181 #[cfg(feature = "Foundation")] 1182 unsafe impl ::std::marker::Sync for UserAuthenticationOperation {} 1183 #[repr(transparent)] 1184 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 1185 pub struct UserIdentity(::windows::runtime::IInspectable); 1186 impl UserIdentity { 1187 #[cfg(feature = "Foundation_Collections")] 1188 pub fn Tickets(&self) -> ::windows::runtime::Result<super::super::super::Foundation::Collections::IVectorView<OnlineIdServiceTicket>> { 1189 let this = self; 1190 unsafe { 1191 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 1192 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<super::super::super::Foundation::Collections::IVectorView<OnlineIdServiceTicket>>(result__) 1193 } 1194 } 1195 pub fn Id(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 1196 let this = self; 1197 unsafe { 1198 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 1199 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 1200 } 1201 } 1202 pub fn SafeCustomerId(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 1203 let this = self; 1204 unsafe { 1205 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 1206 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 1207 } 1208 } 1209 pub fn SignInName(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 1210 let this = self; 1211 unsafe { 1212 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 1213 (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 1214 } 1215 } 1216 pub fn FirstName(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 1217 let this = self; 1218 unsafe { 1219 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 1220 (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 1221 } 1222 } 1223 pub fn LastName(&self) -> ::windows::runtime::Result<::windows::runtime::HSTRING> { 1224 let this = self; 1225 unsafe { 1226 let mut result__: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING> = ::std::mem::zeroed(); 1227 (::windows::runtime::Interface::vtable(this).11)(::std::mem::transmute_copy(this), &mut result__).from_abi::<::windows::runtime::HSTRING>(result__) 1228 } 1229 } 1230 pub fn IsBetaAccount(&self) -> ::windows::runtime::Result<bool> { 1231 let this = self; 1232 unsafe { 1233 let mut result__: bool = ::std::mem::zeroed(); 1234 (::windows::runtime::Interface::vtable(this).12)(::std::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) 1235 } 1236 } 1237 pub fn IsConfirmedPC(&self) -> ::windows::runtime::Result<bool> { 1238 let this = self; 1239 unsafe { 1240 let mut result__: bool = ::std::mem::zeroed(); 1241 (::windows::runtime::Interface::vtable(this).13)(::std::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) 1242 } 1243 } 1244 } 1245 unsafe impl ::windows::runtime::RuntimeType for UserIdentity { 1246 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Security.Authentication.OnlineId.UserIdentity;{2146d9cd-0742-4be3-8a1c-7c7ae679aa88})"); 1247 } 1248 unsafe impl ::windows::runtime::Interface for UserIdentity { 1249 type Vtable = IUserIdentity_abi; 1250 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(558291405, 1858, 19427, [138, 28, 124, 122, 230, 121, 170, 136]); 1251 } 1252 impl ::windows::runtime::RuntimeName for UserIdentity { 1253 const NAME: &'static str = "Windows.Security.Authentication.OnlineId.UserIdentity"; 1254 } 1255 impl ::std::convert::From<UserIdentity> for ::windows::runtime::IUnknown { 1256 fn from(value: UserIdentity) -> Self { 1257 unsafe { ::std::mem::transmute(value) } 1258 } 1259 } 1260 impl ::std::convert::From<&UserIdentity> for ::windows::runtime::IUnknown { 1261 fn from(value: &UserIdentity) -> Self { 1262 ::std::convert::From::from(::std::clone::Clone::clone(value)) 1263 } 1264 } 1265 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for UserIdentity { 1266 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 1267 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 1268 } 1269 } 1270 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &UserIdentity { 1271 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 1272 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 1273 } 1274 } 1275 impl ::std::convert::From<UserIdentity> for ::windows::runtime::IInspectable { 1276 fn from(value: UserIdentity) -> Self { 1277 value.0 1278 } 1279 } 1280 impl ::std::convert::From<&UserIdentity> for ::windows::runtime::IInspectable { 1281 fn from(value: &UserIdentity) -> Self { 1282 value.0.clone() 1283 } 1284 } 1285 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for UserIdentity { 1286 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1287 ::windows::runtime::Param::Owned(self.0) 1288 } 1289 } 1290 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a UserIdentity { 1291 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1292 ::windows::runtime::Param::Borrowed(&self.0) 1293 } 1294 } 1295 unsafe impl ::std::marker::Send for UserIdentity {} 1296 unsafe impl ::std::marker::Sync for UserIdentity {} 1297