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

UE3:OnlineCommunityContentInterface (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Interface >> OnlineCommunityContentInterface
Package: 
Engine

This interface deals with uploading, finding, and downloading of in game created binary data (screenshots, demo recordings, ghosts, etc.)

Delegates

OnDownloadContentComplete

delegate OnDownloadContentComplete (bool bWasSuccessful, OnlineSubsystem.CommunityContentFile FileDownloaded)

Delegate fired when the async download task has completed

Parameters:

  • bWasSuccessful - true if the async action completed without error, false if there was an error
  • FileDownloaded - the information for the file that was downloaded

OnGetContentPayloadComplete

delegate OnGetContentPayloadComplete (bool bWasSuccessful, OnlineSubsystem.CommunityContentFile FileDownloaded, const out array<bytePayload)

Delegate fired when the async get content payload task has completed

Parameters:

  • bWasSuccessful - true if the async action completed without error, false if there was an error
  • FileDownloaded - the information for the file that was downloaded
  • Payload - the out array that receives contents of the file/blob data that was downloaded

OnReadContentListComplete

delegate OnReadContentListComplete (bool bWasSuccessful)

Delegate fired when the async read task has completed

Parameters:

  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnReadFriendsContentListComplete

delegate OnReadFriendsContentListComplete (bool bWasSuccessful)

Delegate fired when the async read task has completed

Parameters:

  • bWasSuccessful - true if the async action completed without error, false if there was an error

OnUploadContentComplete

delegate OnUploadContentComplete (bool bWasSuccessful, OnlineSubsystem.CommunityContentFile UploadedFile)

Delegate fired when the async upload task has completed

Parameters:

  • bWasSuccessful - true if the async action completed without error, false if there was an error
  • UploadedFile - the corresponding meta data that was associated with the content

Instance functions

AddDownloadContentCompleteDelegate

function AddDownloadContentCompleteDelegate (delegate<OnDownloadContentCompleteDownloadContentCompleteDelegate)

Adds the delegate to the list that will be notified when the task completes

Parameters:

  • DownloadContentCompleteDelegate - the delegate to use for notifications

AddGetContentPayloadCompleteDelegate

function AddGetContentPayloadCompleteDelegate (delegate<OnGetContentPayloadCompleteGetContentPayloadCompleteDelegate)

Adds the delegate to the list that will be notified when the task completes

Parameters:

  • GetContentPayloadCompleteDelegate - the delegate to use for notifications

AddReadContentListCompleteDelegate

function AddReadContentListCompleteDelegate (delegate<OnReadContentListCompleteReadContentListCompleteDelegate)

Adds the delegate to the list that will be notified when the task completes

Parameters:

  • ReadContentListCompleteDelegate - the delegate to use for notifications

AddReadFriendsContentListCompleteDelegate

function AddReadFriendsContentListCompleteDelegate (delegate<OnReadFriendsContentListCompleteReadFriendsContentListCompleteDelegate)

Adds the delegate to the list that will be notified when the task completes

Parameters:

  • ReadFriendsContentListCompleteDelegate - the delegate to use for notifications

AddUploadContentCompleteDelegate

function AddUploadContentCompleteDelegate (delegate<OnUploadContentCompleteUploadContentCompleteDelegate)

Adds the delegate to the list that will be notified when the task completes

Parameters:

  • UploadContentCompleteDelegate - the delegate to use for notifications

ClearDownloadContentCompleteDelegate

function ClearDownloadContentCompleteDelegate (delegate<OnDownloadContentCompleteDownloadContentCompleteDelegate)

Removes the delegate from the list of notifications

Parameters:

  • DownloadContentCompleteDelegate - the delegate to use for notifications

ClearGetContentPayloadCompleteDelegate

function ClearGetContentPayloadCompleteDelegate (delegate<OnGetContentPayloadCompleteGetContentPayloadCompleteDelegate)

Removes the delegate from the list of notifications

Parameters:

  • GetContentPayloadCompleteDelegate - the delegate to use for notifications

ClearReadContentListCompleteDelegate

function ClearReadContentListCompleteDelegate (delegate<OnReadContentListCompleteReadContentListCompleteDelegate)

Removes the delegate from the list of notifications

Parameters:

  • ReadContentListCompleteDelegate - the delegate to use for notifications

ClearReadFriendsContentListCompleteDelegate

function ClearReadFriendsContentListCompleteDelegate (delegate<OnReadFriendsContentListCompleteReadFriendsContentListCompleteDelegate)

Removes the delegate from the list of notifications

Parameters:

  • ReadFriendsContentListCompleteDelegate - the delegate to use for notifications

ClearUploadContentCompleteDelegate

function ClearUploadContentCompleteDelegate (delegate<OnUploadContentCompleteUploadContentCompleteDelegate)

Removes the delegate from the list of notifications

Parameters:

  • UploadContentCompleteDelegate - the delegate to use for notifications

DownloadContent

function bool DownloadContent (byte PlayerNum, const out OnlineSubsystem.CommunityContentFile FileToDownload)

Downloads the contents of the specified file

Parameters:

  • PlayerNum - the controller number associated with the player
  • FileToDownload - the file information that tells the system what to download

Returns:

true if the async Download task started successfully, false otherwise

Exit

function Exit ()

Shuts down the community content object

GetContentList

function bool GetContentList (byte PlayerNum, out array<OnlineSubsystem.CommunityContentFileContentFiles)

Copies the content file information for the specified player

Parameters:

  • PlayerNum - the controller number associated with the player
  • ContentFiles - out array that is populated with the file list

Returns:

true if the copy succeeded, false otherwise (still in process, etc.)

GetContentPayload

function bool GetContentPayload (byte PlayerNum, const out OnlineSubsystem.CommunityContentFile FileDownloaded)

Copies the contents of the payload into the specified array for the specified file owned by the specified player

Parameters:

  • PlayerNum - the controller number associated with the player
  • FileDownloaded - the information for the file that was downloaded

Returns:

true if the async Download task started successfully, false otherwise

GetFriendsContentList

function bool GetFriendsContentList (byte PlayerNum, const out OnlineSubsystem.OnlineFriend Friend, out array<OnlineSubsystem.CommunityContentFileContentFiles)

Copies the content file information for the specified player

Parameters:

  • PlayerNum - the controller number associated with the player
  • Friend - the friend to copy the file list for
  • ContentFiles - out array that is populated with the file list

Returns:

true if the copy succeeded, false otherwise (still in process, etc.)

Init

function bool Init ()

Initializes the community content object

Returns:

true if the initialization succeeded, false otherwise

RateContent

function RateContent (byte PlayerNum, const out OnlineSubsystem.CommunityContentFile FileToRate, int NewRating)

Supplies a player defined rating for the specified content

Parameters:

  • PlayerNum - the controller number associated with the player
  • FileToRate - the information for the file that is being rated
  • NewRating - the new rating the player has given for this content

Returns:

true if the rating was successfully started, false otherwise (still in progress, can't find, etc.)

ReadContentList

function bool ReadContentList (byte PlayerNum, optional int StartAt, optional int NumToRead)

Starts the async task that reads the list of content that this person can download. The resulting data includes the information for that file (meta data and rating/download information)

Parameters:

  • PlayerNum - the controller number associated with the player
  • StartAt - used to read from a list starting a known offset
  • NumToRead - the number of items to retrieve (-1 means all)

Returns:

true if the async task succeeded in starting up, false otherwise

ReadFriendsContentList

function bool ReadFriendsContentList (byte PlayerNum, const out array<OnlineSubsystem.OnlineFriendFriends, optional int StartAt, optional int NumToRead)

Starts the async task that reads the list of content that this person can download. The resulting data includes the information for that file (meta data and rating/download information)

Parameters:

  • PlayerNum - the controller number associated with the player
  • Friends - the set of friends to read the content files for
  • StartAt - used to read from a list starting a known offset
  • NumToRead - the number of items to retrieve (-1 means all)

Returns:

true if the async task succeeded in starting up, false otherwise

UploadContent

function bool UploadContent (byte PlayerNum, const out array<bytePayload, const out OnlineSubsystem.CommunityContentMetadata Metadata)

Uploads the contents of the blob to the content server(s)

Parameters:

  • PlayerNum - the controller number associated with the player
  • Payload - the data that is being uploaded
  • Metadata - metadata describing the content

Returns:

true if the async upload task started successfully, false otherwise