1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../../../../css/manpage.css" type="text/css" /> 7<title>Initialize</title> 8 </head> 9 <body> 10<h1><CODE><a href="../../../../nn/Overview.html">nn</a>::<a href="../../../../nn/dlp/Overview.html">dlp</a>::<a href="../../../../nn/dlp/CTR/Overview.html">CTR</a>::<a href="../../../../nn/dlp/CTR/FakeClientWithName/Overview.html">FakeClientWithName</a>::Initialize</CODE> Member Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14static <a href="../../../../nn/Result/Overview.html">nn::Result</a> Initialize( 15 <a href="../../../../nn_types/u8.html">u8</a> scanNum, 16 nn::Handle eventHandle, 17 void * pBuffer, 18 const size_t bufferSize, 19 <a href="../../../../nn/cfg/CTR/UserName/Overview.html">nn::cfg::UserName</a> * pUserName = NULL 20); 21</pre> 22 </div> 23<h2>Arguments</h2> 24 <div class="section"> 25 <table class="arguments"> 26 <thead> 27 <tr> 28 <td width="15" /> 29<th>Name</th> 30<td>Description</td> 31 </tr> 32 </thead> 33 <tr> 34<td>in</td> 35<th>scanNum</th> 36<td>Specifies the number of child programs that can be received by a single scan request. The maximum value is <CODE><a href="../../../../nn/dlp/CTR/MAX_SCAN_NUM.html">MAX_SCAN_NUM</a></CODE>.</td> 37 </tr> 38 <tr> 39<td>in</td> 40<th>eventHandle</th> 41<td>Specifies a handle to the <CODE><a href="../../../../nn/os/Event/Overview.html">nn::os::Event</a></CODE> object waiting for a signal from Download Play. Initialize the event in the application. Use the <CODE><a href="../../../../nn/dlp/CTR/FakeClient/GetEventDesc.html">GetEventDesc</a></CODE> function to get the event information.</td> 42 </tr> 43 <tr> 44<td>in</td> 45<th>pBuffer</th> 46<td>Pointer to the DLP working buffer. Must be 4096-byte aligned.</td> 47 </tr> 48 <tr> 49<td>in</td> 50<th>bufferSize</th> 51<td>Size of working buffer. Must be 4096-byte aligned.</td> 52 </tr> 53 <tr> 54<td>in</td> 55<th><CODE>pUserName</CODE></th> 56<td>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 <CODE>NULL</CODE> is specified here.</td> 57 </tr> </table> 58 </div> 59<h2>Return Values</h2> 60<div class="section">The following <a href="../../../../nn/Result/Overview.html"><CODE>Result</CODE></a> values are returned as the result of the operation.<br /> <br /> 61 <table class="arguments"> 62 <thead> 63 <tr> 64<th>Value</th> 65<td>Description</td> 66 </tr> 67 </thead> 68 <tr> 69<th><CODE>ResultSuccess</CODE></th> 70<td>Initialization successful.</td> 71 </tr> 72 <tr> 73<th><CODE>ResultInvalidPointer</CODE></th> 74<td><SPAN class="argument">pBuffer</SPAN> is either <CODE>NULL</CODE> or not 4096-byte aligned.</td> 75 </tr> 76 <tr> 77<th><CODE>ResultOutOfRange</CODE></th> 78<td>Either <SPAN class="argument">scanNum</SPAN> or <SPAN class="argument">bufferSize</SPAN> is invalid.</td> 79 </tr> 80 <tr> 81<th><CODE>ResultInvalidHandle</CODE></th> 82<td><SPAN class="argument">eventHandle</SPAN> is invalid.</td> 83 </tr> 84 <tr> 85<th><CODE>ResultAlreadyOccupiedWirelessDevice</CODE></th> 86<td>The wireless device is already occupied for another purpose. Exit the other wireless process.</td> 87 </tr> 88 <tr> 89<th><CODE>ResultWirelessOff</CODE></th> 90<td>Communication is impossible (the system is in Sleep Mode or wireless-disabled mode).</td> 91 </tr> 92 <tr> 93<th><CODE>ResultInternalError</CODE></th> 94<td>An irrecoverable error occurred internally.</td> 95 </tr> 96 </table> </div> 97<h2>Description</h2> 98 <div class="section"> 99<p>Initializes a fake client.</p><p>This function is the same as <CODE>nn:dlp::FakeClient::Initialize</CODE>, with the added ability to set a user name.<BR>Precautions regarding user names are described here.<BR> A check is made whether the user name given by <CODE>pUserName</CODE> (the <CODE>userName</CODE> member of <CODE>nn::cfg::UserName</CODE>) follows UGC guidelines. If it includes a profanity word, set the profanity flag (the <CODE>isNgUserName</CODE> member of <CODE>nn:cfg::UserName</CODE>) to <CODE>true</CODE>.<BR> If the profanity flag has been set to <CODE>true</CODE>, do not do anything to hide the profanity word in the user name, just pass it to this function unaltered.<BR> <BR>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.<BR>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.<BR>You must therefore follow the instructions given here.</p><!-- write here --></div> 100<h2>Revision History</h2> 101 <div class="section"> 102 <dl class="history"> 103 <dt>2012/01/20</dt> 104<dd>Initial version.<br /> 105 </dd> 106 </dl> 107 </div> 108 <hr><p>CONFIDENTIAL</p></body> 109</html>