I love the smell of UnrealEd crashing in the morning. – tarquin

UE3:UIDataProvider_OnlinePlayerStorage (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 05:50, 17 January 2010 by Wormbo (Talk | contribs) (1 revision: class descriptions for UDK January update (part 6))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UDK Object >> UIRoot >> UIDataProvider >> UIDataProvider_OnlinePlayerDataBase >> UIDataProvider_OnlinePlayerStorage
Package: 
Engine
Direct subclass:
UIDataProvider_OnlineProfileSettings

This class is responsible for mapping properties in an OnlineGameSettings object to something that the UI system can consume.

Properties

bWasErrorLastRead

Type: bool

If there was an error, it was possible the read was already in progress. This indicates to re-read upon a good completion

PlayerStorageArrayProviders

Type: array<PlayerStorageArrayProvider>

The list of mappings from settings id to their provider

Profile

Type: OnlinePlayerStorage

The storage settings that are used to load/save with the online subsystem

ProviderName

Type: name

Modifiers: const

For displaying in the provider tree

Default value: 'PlayerStorageData'

Default values

Property Value
WriteAccessType ACCESS_WriteAll

Structs

PlayerStorageArrayProvider

Modifiers: native

Keeps a list of providers for each storage settings id

int PlayerStorageId 
The storage settings id that this provider is for
name PlayerStorageName 
Cached to avoid extra look ups
UIDataProvider_OnlinePlayerStorageArray Provider 
The provider object to expose the data with

Functions

Events

OnRegister

event OnRegister (LocalPlayer InPlayer)

Overrides: UIDataProvider_OnlinePlayerDataBase.OnRegister

Binds the player to this provider. Starts the async friends list gathering

Parameters:

  • InPlayer - the player that we are retrieving friends for

OnUnregister

event OnUnregister ()

Overrides: UIDataProvider_OnlinePlayerDataBase.OnUnregister

Clears our delegate for getting login change notifications

SaveStorageData

event bool SaveStorageData ()

Writes the storage data to the online subsystem for this user

Other instance functions

AddReadCompleteDelegate

function AddReadCompleteDelegate (OnlinePlayerInterface PlayerInterface, byte LocalUserNum)

Sets the delegate used to notify the gameplay code that the last read request has completed

Parameters:

  • PlayerInterface - is the OnlinePlayerInterface used
  • LocalUserNum - which user to watch for read complete notifications

ArrayProviderPropertyChanged

function ArrayProviderPropertyChanged (UIDataProvider SourceProvider, optional name PropTag)

Called when a setting or property which is bound to one of our array providers is updated.

Parameters:

  • SourceProvider - the data provider that generated the notification
  • PropTag - the property that changed

ClearReadCompleteDelegate

function ClearReadCompleteDelegate (OnlinePlayerInterface PlayerInterface, byte LocalUserNum)

Clears the delegate used to notify the gameplay code that the last read request has completed

Parameters:

  • PlayerInterface - is the OnlinePlayerInterface used
  • LocalUserNum - which user to stop watching for read complete notifications

OnLoginChange

function OnLoginChange (byte LocalUserNum)

Executes a refetching of the storage data when the login for this player changes

Parameters:

  • LocalUserNum - the player that logged in/out

OnReadStorageComplete

function OnReadStorageComplete (byte LocalUserNum, bool bWasSuccessful)

Handles the notification that the async read of the storage data is done

Parameters:

  • bWasSuccessful - whether the call succeeded or not

OnSettingValueUpdated

function OnSettingValueUpdated (name SettingName)

Handler for the OnDataProviderPropertyChange delegate in our internal array providers. Determines which provider sent the update and propagates that update to this provider's own list of listeners.

Parameters:

  • SettingName - the name of the setting that was changed.

ReadData

function bool ReadData (OnlinePlayerInterface PlayerInterface, byte LocalUserNum, OnlinePlayerStorage PlayerStorage)

Reads the data

Parameters:

  • PlayerInterface - is the OnlinePlayerInterface used
  • LocalUserNum - the user that we are reading the data for
  • PlayerStorage - the object to copy the results to and contains the list of items to read

Returns:

true if the call succeeds, false otherwise

RefreshStorageData

function RefreshStorageData ()

Reads this user's storage data from the online subsystem.

WriteData

function bool WriteData (OnlinePlayerInterface PlayerInterface, byte LocalUserNum, OnlinePlayerStorage PlayerStorage)

Writes the online data for a given local user to the online data store

Parameters:

  • PlayerInterface - is the OnlinePlayerInterface used
  • LocalUserNum - the user that we are writing the data for
  • PlayerStorage - the object that contains the list of items to write

Returns:

true if the call succeeds, false otherwise