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

UE3:OnlineNewsInterfaceMcp (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> MCPBase >> OnlineNewsInterfaceMcp
Package: 
IpDrv
Implemented interfaces
OnlineNewsInterface

Provides an in game news mechanism via the MCP backend

Properties[edit]

bNeedsTicking[edit]

Type: bool

Modifiers: transient

Whether there are outstanding requests that need ticking or not

NewsItems[edit]

Type: array<NewsCacheEntry>

Modifiers: config

The list of cached news items (ips, results, etc.)

ReadNewsDelegates[edit]

Type: array<delegate<OnReadNewsCompleted> >

The list of delegates to notify when the news read is complete

Structs[edit]

NewsCacheEntry[edit]

Modifiers: native

Holds the IP, hostname, URL, and news results for a particular news type

string NewsUrl 
The URL to the news page that we're reading
OnlineSubsystem.EOnlineEnumerationReadState ReadState 
The current async read state for the operation
OnlineSubsystem.EOnlineNewsType NewsType 
The type of news that we are reading
string NewsItem 
The results of the read
float TimeOut 
The amount of time before giving up on the read
bool bIsUnicode 
Whether the news item is in unicode or ansi
pointer{class FHttpDownloadString} HttpDownloader 
Pointer to the native helper object that performs the download

Delegates[edit]

OnReadNewsCompleted[edit]

delegate OnReadNewsCompleted (bool bWasSuccessful, OnlineSubsystem.EOnlineNewsType NewsType)

Specified by: OnlineNewsInterface.OnReadNewsCompleted

Delegate used in notifying the UI/game that the news read operation completed

Parameters:

  • bWasSuccessful - true if the read completed ok, false otherwise
  • NewsType - the type of news read that just completed

Functions[edit]

Native functions[edit]

ReadNews[edit]

native function bool ReadNews (byte LocalUserNum, OnlineSubsystem.EOnlineNewsType NewsType)

Specified by: OnlineNewsInterface.ReadNews

Reads the game specific news from the online subsystem

Parameters:

  • LocalUserNum - the local user the news is being read for
  • NewsType - the type of news to read

Returns:

true if the async task was successfully started, false otherwise

Other instance functions[edit]

AddReadNewsCompletedDelegate[edit]

function AddReadNewsCompletedDelegate (delegate<OnReadNewsCompletedReadNewsDelegate)

Specified by: OnlineNewsInterface.AddReadNewsCompletedDelegate

Sets the delegate used to notify the gameplay code that news reading has completed

Parameters:

  • ReadGameNewsDelegate - the delegate to use for notifications

ClearReadNewsCompletedDelegate[edit]

function ClearReadNewsCompletedDelegate (delegate<OnReadNewsCompletedReadGameNewsDelegate)

Specified by: OnlineNewsInterface.ClearReadNewsCompletedDelegate

Removes the specified delegate from the notification list

Parameters:

  • ReadGameNewsDelegate - the delegate to use for notifications

GetNews[edit]

function string GetNews (byte LocalUserNum, OnlineSubsystem.EOnlineNewsType NewsType)

Specified by: OnlineNewsInterface.GetNews

Returns the game specific news item from the cache

Parameters:

  • LocalUserNum - the local user the news is being read for
  • NewsType - the type of news to read

Returns:

an empty string if no data was read, otherwise the contents of the news read