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     void * icon,
22     size_t iconSize,
23     wchar_t * infoTextData,
24     size_t infoTextSize
25);
26</pre>
27    </div>
28<h2>Arguments</h2>
29    <div class="section">
30      <table class="arguments">
31        <thead>
32          <tr>
33            <td width="15" />
34<th>Name</th>
35<td>Description</td>
36          </tr>
37        </thead>
38        <tr>
39<td>in</td>
40<th>cecTitleId</th>
41<td>StreetPass ID</td>
42        </tr>
43        <tr>
44<td>in</td>
45<th>groupId</th>
46<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>
47        </tr>
48        <tr>
49<td>in</td>
50<th>messageTypeFlag</th>
51<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>
52        </tr>
53        <tr>
54<td>in</td>
55<th>sendMode</th>
56<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>
57        </tr>
58        <tr>
59<td>in</td>
60<th>sendCount</th>
61<td>The <CODE>sendCount</CODE> and <CODE>propagationCount</CODE> values cannot both be set to greater than 1 at the same time.</td>
62        </tr>
63        <tr>
64<td>in</td>
65<th>propagationCount</th>
66<td>The <CODE>sendCount</CODE> and <CODE>propagationCount</CODE> values cannot both be set to greater than 1 at the same time.</td>
67        </tr>
68        <tr>
69<td>in</td>
70<th>icon</th>
71<td>Specifies an icon.<br />Format: RGB565 (little-endian)<br /> Size: 40 x 40 (3200 bytes)<br /></td>
72        </tr>
73        <tr>
74<td>in</td>
75<th>iconSize</th>
76<td>Specifies the size of the icon data.</td>
77        </tr>
78        <tr>
79<td>in</td>
80<th>infoTextData</th>
81<td>Sets the information text of a <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>. Encoding UTF16-LE<br /> Display size: The number of characters displayable as two lines of 16 double-byte characters<br />Maximum buffer size: 128 x 2 bytes (including line breaks and the <CODE>NULL</CODE> terminator)<br /></td>
82        </tr>
83        <tr>
84<td>in</td>
85<th>infoTextSize</th>
86<td>Specifies the data size for the information text of a <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>.</td>
87        </tr> </table>
88    </div>
89<h2>Return Values</h2>
90<div class="section"><a href="../../../../nn/Result/Overview.html">nn::Result</a><br /> <br />
91      <table class="arguments">
92        <thead>
93          <tr>
94<th>Value</th>
95<td>Description</td>
96          </tr>
97        </thead>
98        <tr>
99<th><CODE>ResultSuccess</CODE></th>
100<td>Process succeeded.</td>
101        </tr>
102        <tr>
103<th><CODE>ResultInvalidArgument</CODE></th>
104<td>An invalid value has been set.</td>
105        </tr>
106        <tr>
107<th><CODE>ResultInvalidCombination</CODE></th>
108<td>The transmission count and propagation count have both been set equal to a value of 2 or greater.</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 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.</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>