Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

UE3:OnlineTitleFileDownloadMcp (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> MCPBase >> OnlineTitleFileDownloadMcp
Package: 
IpDrv

Provides a mechanism for downloading arbitrary files from the MCP server

Properties

BaseUrl

Type: string

Modifiers: config

The base URL to use when downloading files, such that BaseUrl?TitleID=1234&FileName=MyFile.ini is the complete URL

CurrentIndex

Type: int

Modifiers: transient

The index of the file in the array being processed

HttpDownloader

Type: pointer{class FHttpDownloadBinary}

Modifiers: private, native, const

The class that will communicate with backend to download the file

ReadTitleFileCompleteDelegates

Type: array<delegate<OnReadTitleFileComplete> >

Modifiers: private

The list of delegates to notify when a file is read

TimeOut

Type: float

Modifiers: config

The amount of time to allow for downloading of the file

TitleFiles

Type: array<OnlineSubsystem.TitleFile>

Modifiers: private

The list of title files that have been read or are being read

Delegates

OnReadTitleFileComplete

delegate OnReadTitleFileComplete (bool bWasSuccessful, string FileName)

Delegate fired when a file read from the network platform's title specific storage is complete

Parameters:

  • bWasSuccessful - whether the file read was successful or not
  • FileName - the name of the file this was for

Functions

Native functions

ClearDownloadedFiles

native function bool ClearDownloadedFiles ()

Empties the set of downloaded files if possible (no async tasks outstanding)

Returns:

true if they could be deleted, false if they could not

GetTitleFileContents

native function bool GetTitleFileContents (string FileName, out array<byteFileContents)

Copies the file data into the specified buffer for the specified file

Parameters:

  • FileName - the name of the file to read
  • FileContents - the out buffer to copy the data into

Returns:

true if the data was copied, false otherwise

ReadTitleFile

native function bool ReadTitleFile (string FileToRead)

Starts an asynchronous read of the specified file from the network platform's title specific file store

Parameters:

  • FileToRead - the name of the file to read

Returns:

true if the calls starts successfully, false otherwise

Other instance functions

AddReadTitleFileCompleteDelegate

function AddReadTitleFileCompleteDelegate (delegate<OnReadTitleFileCompleteReadTitleFileCompleteDelegate)

Adds the delegate to the list to be notified when a requested file has been read

Parameters:

  • ReadTitleFileCompleteDelegate - the delegate to add

ClearReadTitleFileCompleteDelegate

function ClearReadTitleFileCompleteDelegate (delegate<OnReadTitleFileCompleteReadTitleFileCompleteDelegate)

Removes the delegate from the notify list

Parameters:

  • ReadTitleFileCompleteDelegate - the delegate to remove

GetTitleFileState

function OnlineSubsystem.EOnlineEnumerationReadState GetTitleFileState (string FileName)

Determines the async state of the tile file read operation

Parameters:

  • FileName - the name of the file to check on

Returns:

the async state of the file read