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>NewMessage</title> 8 </head> 9 <body> 10<h1><CODE>nn::cec::CTR::Message::NewMessage</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> NewMessage( 15 <a href="../../../../nn/cec/CTR/TitleId.html">TitleId</a> cecTitleId, 16 u32 groupId, 17 <a href="../../../../nn/cec/CTR/MessageTypeFlag.html">MessageTypeFlag</a> messageTypeFlag, 18 <a href="../../../../nn/cec/CTR/SendMode.html">SendMode</a> sendMode, 19 u8 sendCount, 20 u8 propagationCount 21); 22</pre> 23 </div> 24<h2>Arguments</h2> 25 <div class="section"> 26 <table class="arguments"> 27 <thead> 28 <tr> 29 <td width="15" /> 30<th>Name</th> 31<td>Description</td> 32 </tr> 33 </thead> 34 <tr> 35<td>in</td> 36<th>cecTitleId</th> 37<td>StreetPass ID</td> 38 </tr> 39 <tr> 40<td>in</td> 41<th>groupId</th> 42<td><a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a> group ID <br /> Same as the value set with <a href="../../../../nn/cec/CTR/Message/SetGroupID.html"><CODE>SetGroupID</CODE></a>.</td> 43 </tr> 44 <tr> 45<td>in</td> 46<th>messageTypeFlag</th> 47<td>Specifies whether the recipient is a <I>friend</I> or a <I>non-friend</I> using the <a href="../../../../nn/cec/CTR/MessageTypeFlag.html"><CODE>MessageTypeFlag</CODE></a> enumerated type.</td> 48 </tr> 49 <tr> 50<td>in</td> 51<th>sendMode</th> 52<td>Specifies the send mode (receive only, send only, send and receive, or exchange) using the <CODE><a href="../../../../nn/cec/CTR/SendMode.html">SendMode</a></CODE> enumerated type. This is the same as the value set by the <a href="../../../../nn/cec/CTR/SendMode.html"><CODE>SetSendMode</CODE></a> function.</td> 53 </tr> 54 <tr> 55<td>in</td> 56<th>sendCount</th> 57<td>The <CODE>sendCount</CODE> and <CODE>propagationCount</CODE> values cannot both be set to greater than 1 at the same time.</td> 58 </tr> 59 <tr> 60<td>in</td> 61<th>propagationCount</th> 62<td>The <CODE>sendCount</CODE> and <CODE>propagationCount</CODE> values cannot both be set to greater than 1 at the same time.</td> 63 </tr> </table> 64 </div> 65<h2>Return Values</h2> 66<div class="section"><a href="../../../../nn/Result/Overview.html">nn::Result</a><br /> <br /> 67 <table class="arguments"> 68 <thead> 69 <tr> 70<th>Value</th> 71<td>Description</td> 72 </tr> 73 </thead> 74 <tr> 75<th><CODE>ResultSuccess</CODE></th> 76<td>Process succeeded.</td> 77 </tr> 78 <tr> 79<th><CODE>ResultInvalidArgument</CODE></th> 80<td>An invalid value has been set.</td> 81 </tr> 82 <tr> 83<th><CODE>ResultInvalidCombination</CODE></th> 84<td>The transmission count and propagation count have both been set equal to a value of 2 or greater.</td> 85 </tr> 86 <tr> 87<th>ResultTooLarge</th> 88<td>The data is too large.</td> 89 </tr> 90 <tr> 91<th>ResultNotAuthorized</th> 92<td>Attempted to edit a message that had already been established and assigned a <CODE>MessageId</CODE>.</td> 93 </tr> 94 <tr> 95<th>A value other than the above.</th> 96<td>Failed.</td> 97 </tr> 98 </table> </div> 99<h2>Description</h2> 100 <div class="section"> 101<p>Creates a new <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</p><p>This function sets the basic parameters. A message is sent via StreetPass after the <a href="../../../../nn/cec/CTR/Message/SetMessageBody.html"><CODE>SetMessageBody</CODE></a> function has set the body (data) of the message and the <a href="../../../../nn/cec/CTR/MessageBox/WriteMessage.html"><CODE>MessageBox::WriteMessage</CODE></a> function has written the message to the outbox.<br /><br />You must set the icon and message body separately.</p><!-- write here --></div> 102<h2>Revision History</h2> 103 <div class="section"> 104 <dl class="history"> 105 <dt>2010/08/16</dt> 106<dd>Initial version.<br /> 107 </dd> 108 </dl> 109 </div> 110 <hr><p>CONFIDENTIAL</p></body> 111</html>