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>CreateMessageBox</title> 8 </head> 9 <body> 10<h1><CODE>nn::cec::CTR::MessageBox::CreateMessageBox</CODE> Member Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14<a href="../../../../nn/Result/Overview.html">nn::Result</a> CreateMessageBox( 15 const <a href="../../../../nn/cec/CTR/TitleId.html">TitleId</a> cecTitleId, 16 const u32 privateId, 17 const char * hmacKey, 18 size_t inboxSizeMax = CEC_INBOX_SIZE_DEFAULT, 19 size_t outboxSizeMax = CEC_OUTBOX_SIZE_DEFAULT, 20 size_t inboxMessNumMax = CEC_INBOX_MESSNUM_DEFAULT, 21 size_t outboxMessNumMax = CEC_OUTBOX_MESSNUM_DEFAULT, 22 size_t messageSizeMax = CEC_MESSSIZEMAX_DEFAULT 23); 24</pre> 25 </div> 26<h2>Arguments</h2> 27 <div class="section"> 28 <table class="arguments"> 29 <thead> 30 <tr> 31 <td width="15" /> 32<th>Name</th> 33<td>Description</td> 34 </tr> 35 </thead> 36 <tr> 37<td>in</td> 38<th>cecTitleId</th> 39<td>StreetPass ID</td> 40 </tr> 41 <tr> 42<td>in</td> 43<th>privateId</th> 44<td>The key needed to open a message box.→ <a href="../../../../nn/cec/CTR/MessageBox/OpenMessageBox.html"><CODE>OpenMessageBox</CODE></a><br />The value used must be stored by the application accessing the message box.</td> 45 </tr> 46 <tr> 47<td>in</td> 48<th>hmacKey</th> 49<td>Specifies the key needed to read a <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>. Specify a string of 32 characters.</cf>This must be a key shared with the communication partner.<br />This value is used to check if the transmitted data has been tampered with. Transmitted data is signed with a signature generated using this key. Use a value stored by the application.</td> 50 </tr> 51 <tr> 52<td>in</td> 53<th>inboxSizeMax</th> 54<td>Specifies the maximum amount of data that can be saved in the inbox. The combined size of the inbox and outbox must be no more than 1 MB. The default size is 512 * 1024 bytes.</td> 55 </tr> 56 <tr> 57<td>in</td> 58<th>outboxSizeMax</th> 59<td>Specifies the maximum amount of data that can be saved in the outbox. The combined size of the inbox and outbox must be no more than 1 MB. The default size is 512 * 1024 bytes.</td> 60 </tr> 61 <tr> 62<td>in</td> 63<th>inboxMessNumMax</th> 64<td>Specifies the maximum number of messages that can be saved in the inbox. The default is 99, which is the maximum specifiable value.</td> 65 </tr> 66 <tr> 67<td>in</td> 68<th>outboxMessNumMax</th> 69<td>Specifies the maximum number of messages that can be saved in the outbox. The default is 99, which is the maximum specifiable value.</td> 70 </tr> 71 <tr> 72<td>in</td> 73<th>messageSizeMax</th> 74<td>Specifies the maximum size of a message. Messages that exceed this size cannot be saved. Attempting to do so causes an error when calling <CODE>WriteMessage</CODE>.</td> 75 </tr> </table> 76 </div> 77<h2>Return Values</h2> 78<div class="section"><a href="../../../../nn/Result/Overview.html">nn::Result</a><br /> <br /> 79 <table class="arguments"> 80 <thead> 81 <tr> 82<th>Value</th> 83<td>Description</td> 84 </tr> 85 </thead> 86 <tr> 87<th><CODE>ResultSuccess</CODE></th> 88<td>Process succeeded.</td> 89 </tr> 90 <tr> 91<th><CODE>ResultBoxAlreadyExists</CODE></th> 92<td>The box already exists.</td> 93 </tr> 94 <tr> 95<th><CODE>ResultBoxNumFull</CODE></th> 96<td>The maximum number of boxes have been created. To create a new box, you must delete a box for another game title.</td> 97 </tr> 98 <tr> 99<th><CODE>ResultInvalidArgument</CODE></th> 100<td>An argument was specified incorrectly.</td> 101 </tr> 102 <tr> 103<th><CODE>ResultInvalidData</CODE></th> 104<td>There is a problem with the data being set.</td> 105 </tr> 106 <tr> 107<th><CODE>ResultStateBusy</CODE></th> 108<td>Unable to access because the daemon is busy.</td> 109 </tr> 110 <tr> 111<th>A value other than the above.</th> 112<td>Failed.</td> 113 </tr> 114 </table> </div> 115<h2>Description</h2> 116 <div class="section"> 117<p>Creates a <CODE>MessageBox</CODE>. An inbox and outbox are created within the message box.</p><p>(In the final version, icons and application names must be set. This format is maintained for compatibility with previous versions.)</p><!-- write here --></div> 118<h2>Revision History</h2> 119 <div class="section"> 120 <dl class="history"> 121 <dt>2010/08/16</dt> 122<dd>Initial version.<br /> 123 </dd> 124 </dl> 125 </div> 126 <hr><p>CONFIDENTIAL</p></body> 127</html>