nn::dlp::CTR::FakeClientWithName::Initialize Member Function

Syntax

static nn::Result Initialize(
     u8 scanNum,
     nn::Handle eventHandle,
     void * pBuffer,
     const size_t bufferSize,
     nn::cfg::UserName * pUserName = NULL
);

Parameters

Name Description
in scanNum Specifies the number of child programs that can be received by a single scan request. The maximum value is MAX_SCAN_NUM.
in eventHandle Specifies a handle to the nn::os::Event object waiting for a signal from Download Play. Initialize the event in the application. Use the GetEventDesc function to get the event information.
in pBuffer Pointer to the DLP working buffer. Must be 4096-byte aligned.
in bufferSize Size of working buffer. Must be 4096-byte aligned.
in pUserName Specifies the user name. Handle the user name according to UGC guidelines and information given on this page. The user name set in system settings is used if NULL is specified here.

Return Values

The following Result values are returned as the result of the operation.

Value Description
ResultSuccess Initialization successful.
ResultInvalidPointer pBuffer is either NULL or not 4096-byte aligned.
ResultOutOfRange Either scanNum or bufferSize is invalid.
ResultInvalidHandle eventHandle is invalid.
ResultAlreadyOccupiedWirelessDevice The wireless device is already occupied for another purpose. Exit the other wireless process.
ResultWirelessOff Communication is impossible (the system is in Sleep Mode or wireless-disabled mode).
ResultInternalError An irrecoverable error occurred internally.

Description

Initializes a fake client.

This function is the same as nn:dlp::FakeClient::Initialize, with the added ability to set a user name.
Precautions regarding user names are described here.
A check is made whether the user name given by pUserName (the userName member of nn::cfg::UserName) follows UGC guidelines. If it includes a profanity word, set the profanity flag (the isNgUserName member of nn:cfg::UserName) to true.
If the profanity flag has been set to true, do not do anything to hide the profanity word in the user name, just pass it to this function unaltered.

Note, however, that the user name specified to this function can be obtained as node information, the obtained user name includes node information. Be sure, therefore, to follow guidelines and appropriately process user names based on the profanity flag before displaying them for the user.
The reason the system needs to display user names by looking at the profanity flag is so that behavior matches download play of built-in system applications.
You must therefore follow the instructions given here.

Revision History

2012/01/20
Initial version.

CONFIDENTIAL