SteamUser

Swift
public struct SteamUser: Sendable

Steamworks ISteamUser

Access via user.


Topics

func advertiseGame(gameServer: SteamID, ipServer: Int, portServer: UInt16)

Steamworks ISteamUser::AdvertiseGame()

Declaration
Swift
public func advertiseGame(
    gameServer: SteamID, ipServer: Int, portServer: UInt16)

func isBehindNAT() -> Bool

Steamworks ISteamUser::BIsBehindNAT()

Declaration
Swift
public func isBehindNAT() -> Bool

func isPhoneIdentifying() -> Bool

Steamworks ISteamUser::BIsPhoneIdentifying()

Declaration
Swift
public func isPhoneIdentifying() -> Bool

func isPhoneRequiringVerification() -> Bool

Steamworks ISteamUser::BIsPhoneRequiringVerification()

Declaration
Swift
public func isPhoneRequiringVerification() -> Bool

func isPhoneVerified() -> Bool

Steamworks ISteamUser::BIsPhoneVerified()

Declaration
Swift
public func isPhoneVerified() -> Bool

func isTwoFactorEnabled() -> Bool

Steamworks ISteamUser::BIsTwoFactorEnabled()

Declaration
Swift
public func isTwoFactorEnabled() -> Bool

func loggedOn() -> Bool

Steamworks ISteamUser::BLoggedOn()

Declaration
Swift
public func loggedOn() -> Bool

func setDurationControlOnlineState(newState: DurationControlOnlineState) -> Bool

Steamworks ISteamUser::BSetDurationControlOnlineState()

Declaration
Swift
@discardableResult
public func setDurationControlOnlineState(newState: DurationControlOnlineState)
    -> Bool

func beginAuthSession(authTicket: UnsafeRawPointer, authTicketSize: Int, steamID: SteamID) -> BeginAuthSessionResult

Steamworks ISteamUser::BeginAuthSession()

Declaration
Swift
public func beginAuthSession(
    authTicket: UnsafeRawPointer, authTicketSize: Int, steamID: SteamID
) -> BeginAuthSessionResult

func cancelAuthTicket(authTicket: HAuthTicket)

Steamworks ISteamUser::CancelAuthTicket()

Declaration
Swift
public func cancelAuthTicket(authTicket: HAuthTicket)

func decompressVoice(compressed: UnsafeRawPointer, compressedSize: Int, destBuffer: UnsafeMutableRawPointer, destBufferSize: Int, desiredSampleRate: Int) -> (rc: VoiceResult, bytesWritten: Int)

Steamworks ISteamUser::DecompressVoice()

Declaration
Swift
public func decompressVoice(
    compressed: UnsafeRawPointer, compressedSize: Int,
    destBuffer: UnsafeMutableRawPointer, destBufferSize: Int,
    desiredSampleRate: Int
) -> (rc: VoiceResult, bytesWritten: Int)

func endAuthSession(steamID: SteamID)

Steamworks ISteamUser::EndAuthSession()

Declaration
Swift
public func endAuthSession(steamID: SteamID)

func getAuthSessionTicket(maxTicketSize: Int, steamNetworkingIdentity: SteamNetworkingIdentity?) -> (rc: HAuthTicket, ticket: [UInt8], ticketSize: Int)

Steamworks ISteamUser::GetAuthSessionTicket()

Declaration
Swift
public func getAuthSessionTicket(
    maxTicketSize: Int = 1024, steamNetworkingIdentity: SteamNetworkingIdentity?
) -> (rc: HAuthTicket, ticket: [UInt8], ticketSize: Int)

func getAuthTicketForWebApi(identity: String?) -> HAuthTicket

Steamworks ISteamUser::GetAuthTicketForWebApi()

Declaration
Swift
public func getAuthTicketForWebApi(identity: String?) -> HAuthTicket

func getAvailableVoice(uncompressedVoiceDesiredSampleRateDeprecated: Int) -> (rc: VoiceResult, compressedSize: Int, uncompressedDeprecatedSize: Int)

Steamworks ISteamUser::GetAvailableVoice()

Declaration
Swift
public func getAvailableVoice(
    uncompressedVoiceDesiredSampleRateDeprecated: Int = 0
) -> (rc: VoiceResult, compressedSize: Int, uncompressedDeprecatedSize: Int)

func getDurationControl(completion: (DurationControl?) -> Void)

Steamworks ISteamUser::GetDurationControl(), callback

Declaration
Swift
public func getDurationControl(completion: @escaping (DurationControl?) -> Void)

func getDurationControl() async -> DurationControl?

Steamworks ISteamUser::GetDurationControl(), async

Declaration
Swift
public func getDurationControl() async -> DurationControl?

func getEncryptedAppTicket(returnTicket: Bool, maxTicketSize: Int) -> (rc: Bool, ticket: [UInt8], ticketSize: Int)

Steamworks ISteamUser::GetEncryptedAppTicket()

Declaration
Swift
public func getEncryptedAppTicket(returnTicket: Bool = true, maxTicketSize: Int)
    -> (rc: Bool, ticket: [UInt8], ticketSize: Int)

func getGameBadgeLevel(series: Int, foil: Bool) -> Int

Steamworks ISteamUser::GetGameBadgeLevel()

Declaration
Swift
public func getGameBadgeLevel(series: Int, foil: Bool) -> Int

func getHSteamUser() -> HSteamUser

Steamworks ISteamUser::GetHSteamUser()

Declaration
Swift
public func getHSteamUser() -> HSteamUser

func getMarketEligibility(completion: (MarketEligibilityResponse?) -> Void)

Steamworks ISteamUser::GetMarketEligibility(), callback

Declaration
Swift
public func getMarketEligibility(
    completion: @escaping (MarketEligibilityResponse?) -> Void)

func getMarketEligibility() async -> MarketEligibilityResponse?

Steamworks ISteamUser::GetMarketEligibility(), async

Declaration
Swift
public func getMarketEligibility() async -> MarketEligibilityResponse?

func getPlayerSteamLevel() -> Int

Steamworks ISteamUser::GetPlayerSteamLevel()

Declaration
Swift
public func getPlayerSteamLevel() -> Int

func getSteamID() -> SteamID

Steamworks ISteamUser::GetSteamID()

Declaration
Swift
public func getSteamID() -> SteamID

func getUserDataFolder(bufferSize: Int) -> (rc: Bool, buffer: String)

Steamworks ISteamUser::GetUserDataFolder()

Declaration
Swift
public func getUserDataFolder(bufferSize: Int = SteamConstants.filenameMaxSize)
    -> (rc: Bool, buffer: String)

func getVoice(wantCompressed: Bool, destBuffer: UnsafeMutableRawPointer, destBufferSize: Int, wantUncompressedDeprecated: Bool, uncompressedDestBufferDeprecated: UnsafeMutableRawPointer?, uncompressedDestBufferSizeDeprecatedSize: Int, uncompressedVoiceDesiredSampleRateDeprecated: Int) -> (rc: VoiceResult, bytesWritten: Int, uncompressBytesWrittenDeprecated: Int)

Steamworks ISteamUser::GetVoice()

Declaration
Swift
public func getVoice(
    wantCompressed: Bool, destBuffer: UnsafeMutableRawPointer,
    destBufferSize: Int, wantUncompressedDeprecated: Bool = false,
    uncompressedDestBufferDeprecated: UnsafeMutableRawPointer? = nil,
    uncompressedDestBufferSizeDeprecatedSize: Int = 0,
    uncompressedVoiceDesiredSampleRateDeprecated: Int = 0
) -> (rc: VoiceResult, bytesWritten: Int, uncompressBytesWrittenDeprecated: Int)

func getVoiceOptimalSampleRate() -> Int

Steamworks ISteamUser::GetVoiceOptimalSampleRate()

Declaration
Swift
public func getVoiceOptimalSampleRate() -> Int

func initiateGameConnectionDEPRECATED(authBlob: UnsafeMutableRawPointer, maxAuthBlobSize: Int, gameServer: SteamID, ipServer: Int, portServer: UInt16, secure: Bool) -> Int

Steamworks ISteamUser::InitiateGameConnection_DEPRECATED()

Declaration
Swift
public func initiateGameConnectionDEPRECATED(
    authBlob: UnsafeMutableRawPointer, maxAuthBlobSize: Int,
    gameServer: SteamID, ipServer: Int, portServer: UInt16, secure: Bool
) -> Int

func requestEncryptedAppTicket(dataToInclude: [UInt8], completion: (EncryptedAppTicketResponse?) -> Void)

Steamworks ISteamUser::RequestEncryptedAppTicket(), callback

Declaration
Swift
public func requestEncryptedAppTicket(
    dataToInclude: [UInt8],
    completion: @escaping (EncryptedAppTicketResponse?) -> Void)

func requestEncryptedAppTicket(dataToInclude: [UInt8]) async -> EncryptedAppTicketResponse?

Steamworks ISteamUser::RequestEncryptedAppTicket(), async

Declaration
Swift
public func requestEncryptedAppTicket(dataToInclude: [UInt8]) async
    -> EncryptedAppTicketResponse?

func requestStoreAuthURL(redirectURL: String, completion: (StoreAuthURLResponse?) -> Void)

Steamworks ISteamUser::RequestStoreAuthURL(), callback

Declaration
Swift
public func requestStoreAuthURL(
    redirectURL: String, completion: @escaping (StoreAuthURLResponse?) -> Void)

func requestStoreAuthURL(redirectURL: String) async -> StoreAuthURLResponse?

Steamworks ISteamUser::RequestStoreAuthURL(), async

Declaration
Swift
public func requestStoreAuthURL(redirectURL: String) async
    -> StoreAuthURLResponse?

func startVoiceRecording()

Steamworks ISteamUser::StartVoiceRecording()

Declaration
Swift
public func startVoiceRecording()

func stopVoiceRecording()

Steamworks ISteamUser::StopVoiceRecording()

Declaration
Swift
public func stopVoiceRecording()

func terminateGameConnectionDEPRECATED(ipServer: Int, portServer: UInt16)

Steamworks ISteamUser::TerminateGameConnection_DEPRECATED()

Declaration
Swift
public func terminateGameConnectionDEPRECATED(ipServer: Int, portServer: UInt16)

func trackAppUsageEvent(id: GameID, appUsageEvent: Int, extraInfo: String)

Steamworks ISteamUser::TrackAppUsageEvent()

Declaration
Swift
public func trackAppUsageEvent(
    id: GameID, appUsageEvent: Int, extraInfo: String)

func userHasLicenseForApp(steamID: SteamID, id: AppID) -> UserHasLicenseForAppResult

Steamworks ISteamUser::UserHasLicenseForApp()

Declaration
Swift
public func userHasLicenseForApp(steamID: SteamID, id: AppID)
    -> UserHasLicenseForAppResult

func getEncryptedAppTicket() -> [UInt8]?

Note

Provided by module SteamworksHelpers.

Steamworks ISteamUser::GetEncryptedAppTicket()

Declaration
Swift
public func getEncryptedAppTicket() -> [UInt8]?