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>RegisterStorage</title> 8 </head> 9 <body> 10<h1><CODE><a href="../../nn/Overview.html">nn</a>::<a href="../../nn/boss/Overview.html">boss</a>::RegisterStorage</CODE> Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14<a href="../../nn/Result/Overview.html">nn::Result</a> RegisterStorage( 15 <a href="../../nn_types/bit32.html">bit32</a> storageId, 16 size_t storageSize, 17 <a href="../../nn/boss/StorageType.html">nn::boss::StorageType</a> storageType = nn::boss::USER_EXT_SAVEDATA_STORAGE 18); 19</pre> 20 </div> 21<h2>Parameters</h2> 22 <div class="section"> 23 <table class="arguments"> 24 <thead> 25 <tr> 26 <td width="15" /> 27<th>Name</th> 28<td>Description</td> 29 </tr> 30 </thead> 31 <tr> 32<td>in</td> 33<th>storageId</th> 34<td>Specifies the ID of an expanded save data region that creates BOSS storage.</td> 35 </tr> 36 <tr> 37<td>in</td> 38<th><CODE>storageSize</CODE></th> 39<td>Specifies the maximum total size of files that can be held in BOSS storage.</td> 40 </tr> 41 <tr> 42<td>in</td> 43<th>storageType</th> 44<td>Specifies the BOSS storage type. (Omit this because usually the default BOSS storage for the user's expanded save data region is used.)</td> 45 </tr> </table> 46 </div> 47<h2>Return Values</h2> 48<div class="section">Returns the function's result. Returns one of the <a href="../../nn/Result/Overview.html"><CODE>Result</CODE></a> values listed below. <br /> 49 <table class="arguments"> 50 <thead> 51 <tr> 52<th>Value</th> 53<td>Description</td> 54 </tr> 55 </thead> 56 <tr> 57<th><CODE>Result::IsSuccess</CODE></th> 58<td>Registration successful.</td> 59 </tr> 60 <tr> 61<th><CODE>ResultStorageAccessPermission</CODE></th> 62<td>The program does not have access privileges for the expanded save data region. Reconfirm your access rights.</td> 63 </tr> 64 <tr> 65<th><CODE>ResultIpcNotSessionInitialized</CODE></th> 66<td>The session has not been initialized.<BR>This <CODE><a href="../../nn/Result/Overview.html">Result</a></CODE> is returned if this function is called before the <CODE><a href="../../nn/boss/Initialize.html">Initialize</A></CODE> function. Always call the <a href="../../nn/boss/Initialize.html"><CODE>Initialize</CODE></a> function before using the BOSS library.</td> 67 </tr> 68 <tr> 69<th>A value other than the above.</th> 70<td>Unexpected error (see <CODE>boss_Result.h</CODE> for error details).</td> 71 </tr> 72 </table> </div> 73<h2>Description</h2> 74 <div class="section"> 75<p>Registers BOSS storage.</p><p>BOSS storage must be registered before registering or executing NADL tasks.<br />NS data cannot be downloaded if the storage is not registered.</p><p>Before registering BOSS storage, you must first create an extended save data region in memory.<br />You must also create an expanded save data region, while specifying more than the total number of NS data files to be stored.<br />This function returns an error if you specify an expanded save data region ID in the <CODE>storageID</CODE> argument to which the application does not have access rights.</p><p>When downloading NS data, if the total size of NS data for BOSS storage exceeds the maximum data size, the NS data having the oldest serial ID (=the lowest serial ID) is automatically deleted.</p><p>1) To get NS data without the application registering a task<br />If an application has already registered BOSS storage, and NS data addressed to that application is included in an NS archive downloaded by a task registered by another application, that NS data is automatically downloaded to the BOSS storage already registered.</p><p><B>2) To download NS data addressed to the application that registers a task<br /></B>If the application registers BOSS storage and then registers and runs a task, it can download NS data addressed to the application and store it in the BOSS storage specified when it registered the task. In addition, the same as with 1) above, if NS data addressed to the application that registered BOSS storage is included in an NS archive downloaded by a task registered by another application, that NS data is automatically downloaded to the BOSS storage already registered.</p><p>3) To share NS data with another application<br />You can get NS data downloaded to another application by registering BOSS storage ahead of time in the same extended save data region as that for another application. An application can even get this NS data from other applications when it downloads its own NS data. For more information on these operations, see the <a href="../../nn/boss/GetNsDataIdList.html"><CODE>GetNsDataIdList</CODE></a> and <a href="../../nn/boss/GetNewDataNsDataIdList.html"><CODE>GetNewDataNsDataIdList</CODE></a> functions.<br /><br /></p><!-- write here --></div> 76<h2>Revision History</h2> 77 <div class="section"> 78 <dl class="history"> 79 <dt>2011/12/16</dt> 80<dd>Deleted text about allocating expanded save data capacity.<br /> 81 </dd> 82 <dt>2010/09/16</dt> 83<dd>Initial version.<br /> 84 </dd> 85 </dl> 86 </div> 87 <hr><p>CONFIDENTIAL</p></body> 88</html>