I'm a doctor, not a mechanic

UE3:OnlineSubsystem (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> OnlineSubsystem
Package: 
Engine
Direct subclass:
OnlineSubsystemCommonImpl
This class in other games:
UT3

This class holds a set of online interfaces that game code uses to talk with the platform layer's services. The set of services are implemented as interface pointers so that we can mix & match services at run time. This also allows licensees the ability to use part of our base services and provide custom implmentations of others.

Properties

AccountInterface

Type: OnlineAccountInterface

The interface to use for creating and/or enumerating account information

AsyncMinCompletionTime

Type: float

Modifiers: config

Used to introduce latency when communicating with the online layer for testing purposes

BuildIdOverride

Type: int

Modifiers: config

Used to specify a build override value

bUseBuildIdOverride

Type: bool

Modifiers: config

Whether to use the override or not

ContentInterface

Type: OnlineContentInterface

The interface to use for online content

GameInterface

Type: OnlineGameInterface

The interface to use for creating, searching for, or destroying online games

IniLocPatcherClassName

Type: string

Modifiers: config

The class to create our patcher instance from

NamedInterfaceDefs

Type: array<NamedInterfaceDef>

Modifiers: config

The list of named interfaces to automatically create and store

NamedInterfaces

Type: array<NamedInterface>

Modifiers: private

Holds the set of registered named interfaces

NewsInterface

Type: OnlineNewsInterface

The interface to use for reading game specific news announcements

PartyChatInterface

Type: OnlinePartyChatInterface

The interface to use for accessing online party chat methods

Patcher

Type: IniLocPatcher

Modifiers: transient

The object responsible for patching downloaded INI/loc files

PlayerInterface

Type: OnlinePlayerInterface

The interface for accessing online player methods

PlayerInterfaceEx

Type: OnlinePlayerInterfaceEx

The interface for accessing online player extension methods

Sessions

Type: array<NamedSession>

Modifiers: const, protected

The list of sessions currently managed by the online subsystem

StatsInterface

Type: OnlineStatsInterface

The interface to use for stats read/write operations

SystemInterface

Type: OnlineSystemInterface

The interface for accessing system wide network functions

VoiceInterface

Type: OnlineVoiceInterface

The interface to use for voice communication

Enums

See OnlineSubsystem enums.

Structs

See OnlineSubsystem structs.

Functions

Static native functions

AreUniqueNetIdsEqual

static final native noexportheader function bool AreUniqueNetIdsEqual (const out UniqueNetId NetIdA, const out UniqueNetId NetIdB)

Returns:

TRUE if the netids are the same

GetNumSupportedLogins

static final native function int GetNumSupportedLogins ()

Returns the number of players that can be signed in on this platform

StringToUniqueNetId

static final native noexportheader function bool StringToUniqueNetId (string UniqueNetIdString, out UniqueNetId out_UniqueId)

Converts a string representing a UniqueNetId into a UniqueNetId struct.

Parameters:

  • UniqueNetIdString - the string containing the text representation of the unique id.
  • out_UniqueId - will receive the UniqueNetId generated from the string.

Returns:

TRUE if the string was successfully converted into a UniqueNetId; FALSE if the string was not a valid UniqueNetId.

UniqueNetIdToString

static final native noexportheader function string UniqueNetIdToString (const out UniqueNetId IdToConvert)

Generates a string representation of a UniqueNetId struct.

Parameters:

  • IdToConvert - the unique net id that should be converted to a string.

Returns:

the specified UniqueNetId represented as a string.

Other static functions

DumpGameSettings

static function DumpGameSettings (const OnlineGameSettings GameSettings)

Logs the game settings object

Parameters:

  • GameSettings - settings to dump

DumpNetIds

static function DumpNetIds (const out array<UniqueNetIdPlayers, string DebugLabel)

Log list of players' netids for debugging

Native functions

Init

native event bool Init ()

Called from engine start up code to allow the subsystem to initialize

Returns:

TRUE if the initialization was successful, FALSE otherwise

GetBuildUniqueId

native function int GetBuildUniqueId ()

Generates a unique number based off of the current script compilation

Returns:

the unique number from the current script compilation

Events

Exit

event Exit ()

Called from the engine shutdown code to allow the subsystem to release any resources that may have been allocated

GetNamedInterface

event Object GetNamedInterface (name InterfaceName)

Returns the interface object associated with the specified name

Parameters:

  • InterfaceName - the name of the interface to retrieve

Returns:

The object that matches the interface name if found

PostInit

event bool PostInit ()

Used to trigger any automated tasks that need to happen just after startup

SetAccountInterface

event bool SetAccountInterface (Object NewInterface)

Called from native code to assign the account interface

Parameters:

  • NewInterface - the object to assign as providing the account interface

Returns:

TRUE if the interface is valid, FALSE otherwise

SetContentInterface

event bool SetContentInterface (Object NewInterface)

Called from native code to assign the content interface

Parameters:

  • NewInterface - the object to assign as providing the content interface

Returns:

TRUE if the interface is valid, FALSE otherwise

SetGameInterface

event bool SetGameInterface (Object NewInterface)

Called from native code to assign the game interface

Parameters:

  • NewInterface - the object to assign as providing the game interface

Returns:

TRUE if the interface is valid, FALSE otherwise

SetNamedInterface

event SetNamedInterface (name InterfaceName, Object NewInterface)

Adds the interface object to the named interface list with the specified name

Parameters:

  • InterfaceName - the name of the interface to add it as
  • NewInterface - the object/interface that is being cached

SetNewsInterface

event bool SetNewsInterface (Object NewInterface)

Called from native code to assign the news interface

Parameters:

  • NewInterface - the object to assign as providing the news interface

Returns:

TRUE if the interface is valid, FALSE otherwise

SetPartyChatInterface

event bool SetPartyChatInterface (Object NewInterface)

Called from native code to assign the party chat interface

Parameters:

  • NewInterface - the object to assign as providing the news interface

Returns:

TRUE if the interface is valid, FALSE otherwise

SetPlayerInterface

event bool SetPlayerInterface (Object NewInterface)

Called from native code to assign the player interface

Parameters:

  • NewInterface - the object to assign as providing the player interface

Returns:

TRUE if the interface is valid, FALSE otherwise

SetPlayerInterfaceEx

event bool SetPlayerInterfaceEx (Object NewInterface)

Called from native code to assign the extended player interface

Parameters:

  • NewInterface - the object to assign as providing the player interface

Returns:

TRUE if the interface is valid, FALSE otherwise

SetStatsInterface

event bool SetStatsInterface (Object NewInterface)

Called from native code to assign the stats interface

Parameters:

  • NewInterface - the object to assign as providing the stats interface

Returns:

TRUE if the interface is valid, FALSE otherwise

SetSystemInterface

event bool SetSystemInterface (Object NewInterface)

Called from native code to assign the system interface

Parameters:

  • NewInterface - the object to assign as providing the system interface

Returns:

TRUE if the interface is valid, FALSE otherwise

SetVoiceInterface

event bool SetVoiceInterface (Object NewInterface)

Called from native code to assign the voice interface

Parameters:

  • NewInterface - the object to assign as providing the voice interface

Returns:

TRUE if the interface is valid, FALSE otherwise

Other instance functions

DumpSessionState

function DumpSessionState ()

Logs the session state for all sessions present

DumpVoiceRegistration

function DumpVoiceRegistration ()

Logs the list of players that are registered for voice

SetDebugSpewLevel

function SetDebugSpewLevel (int DebugSpewLevel)

Sets the debug output level for the platform specific API (if applicable)

Parameters:

  • DebugSpewLevel - the level to set