swift-uwp/Sources/UWP/Generated/Windows.Security.Credentials+ABI.swift
2024-02-15 17:14:48 -08:00

99 lines
4.7 KiB
Swift

// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
// swiftlint:disable all
import Foundation
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
import CWinRT
private var IID___x_ABI_CWindows_CSecurity_CCredentials_CICredentialFactory: WindowsFoundation.IID {
.init(Data1: 0x54EF13A1, Data2: 0xBF26, Data3: 0x47B5, Data4: ( 0x97,0xDD,0xDE,0x77,0x9B,0x7C,0xAD,0x58 ))// 54EF13A1-BF26-47B5-97DD-DE779B7CAD58
}
private var IID___x_ABI_CWindows_CSecurity_CCredentials_CIPasswordCredential: WindowsFoundation.IID {
.init(Data1: 0x6AB18989, Data2: 0xC720, Data3: 0x41A7, Data4: ( 0xA6,0xC1,0xFE,0xAD,0xB3,0x63,0x29,0xA0 ))// 6AB18989-C720-41A7-A6C1-FEADB36329A0
}
public enum __ABI_Windows_Security_Credentials {
public class ICredentialFactory: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CSecurity_CCredentials_CICredentialFactory }
internal func CreatePasswordCredentialImpl(_ resource: String, _ userName: String, _ password: String) throws -> IPasswordCredential {
let (credential) = try ComPtrs.initialize { credentialAbi in
let _resource = try! HString(resource)
let _userName = try! HString(userName)
let _password = try! HString(password)
_ = try perform(as: __x_ABI_CWindows_CSecurity_CCredentials_CICredentialFactory.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.CreatePasswordCredential(pThis, _resource.get(), _userName.get(), _password.get(), &credentialAbi))
}
}
return IPasswordCredential(credential!)
}
}
public class IPasswordCredential: WindowsFoundation.IInspectable {
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CSecurity_CCredentials_CIPasswordCredential }
internal func get_ResourceImpl() throws -> String {
var resource: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CSecurity_CCredentials_CIPasswordCredential.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Resource(pThis, &resource))
}
return .init(from: resource)
}
internal func put_ResourceImpl(_ resource: String) throws {
let _resource = try! HString(resource)
_ = try perform(as: __x_ABI_CWindows_CSecurity_CCredentials_CIPasswordCredential.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.put_Resource(pThis, _resource.get()))
}
}
internal func get_UserNameImpl() throws -> String {
var userName: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CSecurity_CCredentials_CIPasswordCredential.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_UserName(pThis, &userName))
}
return .init(from: userName)
}
internal func put_UserNameImpl(_ userName: String) throws {
let _userName = try! HString(userName)
_ = try perform(as: __x_ABI_CWindows_CSecurity_CCredentials_CIPasswordCredential.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.put_UserName(pThis, _userName.get()))
}
}
internal func get_PasswordImpl() throws -> String {
var password: HSTRING?
_ = try perform(as: __x_ABI_CWindows_CSecurity_CCredentials_CIPasswordCredential.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Password(pThis, &password))
}
return .init(from: password)
}
internal func put_PasswordImpl(_ password: String) throws {
let _password = try! HString(password)
_ = try perform(as: __x_ABI_CWindows_CSecurity_CCredentials_CIPasswordCredential.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.put_Password(pThis, _password.get()))
}
}
internal func RetrievePasswordImpl() throws {
_ = try perform(as: __x_ABI_CWindows_CSecurity_CCredentials_CIPasswordCredential.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.RetrievePassword(pThis))
}
}
internal func get_PropertiesImpl() throws -> WindowsFoundation.AnyIPropertySet? {
let (props) = try ComPtrs.initialize { propsAbi in
_ = try perform(as: __x_ABI_CWindows_CSecurity_CCredentials_CIPasswordCredential.self) { pThis in
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Properties(pThis, &propsAbi))
}
}
return __ABI_Windows_Foundation_Collections.IPropertySetWrapper.unwrapFrom(abi: props)
}
}
}