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 <style type="text/css"><!-- 8 span.static_style 9 { 10 font-size : 8pt; 11 color : white; 12 font-weight : bold; 13 background : #44f; 14 border-left : solid 1px #aaf; 15 border-top : solid 1px #aaf; 16 border-right : solid 1px #00c; 17 border-bottom : solid 1px #00c; 18 padding-left : 2px; 19 padding-right : 2px; 20 } 21 span.virtual_style 22 { 23 font-size : 8pt; 24 color : white; 25 font-weight : bold; 26 background : #0a0; 27 border-left : solid 1px #0f0; 28 border-top : solid 1px #0f0; 29 border-right : solid 1px #060; 30 border-bottom : solid 1px #060; 31 padding-left : 2px; 32 padding-right : 2px; 33 } 34 span.protected_style 35 { 36 font-size : 8pt; 37 color : white; 38 font-weight : bold; 39 background : #444; 40 border-left : solid 1px #ccc; 41 border-top : solid 1px #ccc; 42 border-right : solid 1px #222; 43 border-bottom : solid 1px #222; 44 padding-left : 2px; 45 padding-right : 2px; 46 } 47 --></style> 48<title>nn::cec::CTR::Message</title> 49 </head> 50 <body> 51<h1><CODE><a href="../../../../nn/Overview.html">nn</a>::<a href="../../../../nn/cec/Overview.html">cec</a>::<a href="../../../../nn/cec/CTR/Overview.html">CTR</a>::Message</CODE> Class</h1> 52<h2>Syntax</h2> 53 <div class="section"> 54<pre class="definition">class Message</pre> 55 </div> 56<h2>Description</h2> 57 <div class="section"> 58<p>Class that handles CEC <a href="../../../../nn/cec/CTR/Message/Overview.html"><CODE>Message</CODE></a> objects.</p><!-- write here --><h3>Parameters Set in Messages</h3> 59 The parameters set in messages placed in the outbox affect the message behavior, such as the search conditions for communication peers. 60 <h4><CODE>MessageID</CODE></h4> 61 This identifies the message.<br />It is generated and assigned to a message by <CODE>MessageBox::WriteMessage</CODE> when it writes the message to a box.<br />Messages are deemed to be identical if they have the same message ID. A box cannot contain multiple instances of the same message.<br />This value cannot be changed manually.<br /><h4><CODE>GroupID</CODE></h4> 62 It is possible to place multiple messages in the outbox.<br />The oubox normally sends messages one at a time, in the order they were stored.<br />You can send multiple messages simultaneously by assigning them a non-zero <CODE>GroupId</CODE>.<br />If the first message in the outbox has a non-zero <CODE>GroupId</CODE>, then any other messages in the outbox with that same group ID will be sent together with it.<br />The total size of the grouped messages must be no more than 100 KB.<br /><br />You can switch between sending to peers that are friends or non-friends by preparing multiple messages with different <CODE>MessageTypeFlag</CODE> values and the same <CODE>GroupId</CODE>. 63 <h4><CODE>MessageTypeFlag</CODE></h4> 64 Flag for switching messages depending on the recipient peer.<br />Specify <CODE>MESSAGE_TYPEFLAG_ANYONE</CODE> to send regardless of whether the peer is a friend.<br />Specify <CODE>MESSAGE_TYPEFLAG_FRIEND</CODE> to only send to peers that are registered as friends.<br />Specify <CODE>MESSAGE_TYPEFLAG_NON_FRIEND</CODE> to only send to peers that are not registered as friends.<br /><h4><CODE>SendMode</CODE></h4> 65 The sending mode for messages.<br /><CODE>SENDMODE_RECV</CODE>: Receive only<br /><CODE>SENDMODE_SEND</CODE>: Send only<br /><CODE>SENDMODE_SENDRECV</CODE>: Send and receive<br /><CODE>SENDMODE_EXCHANGE</CODE>: Exchange<br />When a peer attempts to send a message, if the send mode does not match, then the communication will fail.<br /><br />The combinations are as follows.<br />Receive only: Can communicate when peer mode is "send only" or "send and receive"<br />Send only: Can communicate when peer mode is "receive only" or "send and receive"<br />Send and receive: Can communicate when peer mode is "receive only", "send only", or "send and receive"<br />Exchange: Can communicate when peer mode is "exchange"<br /><h4>Send count.</h4> 66 Specifies the send count. The send count is decremented by one with each send. The data is no longer sent once the count reaches zero.<br />The message remains in the outbox even after it has been sent and its send count is 0.<br /><h4>Propagation count.</h4> 67 Specifies the propagation count.<br />If this value is 2 or higher, the received data is copied to the outbox and sent to a different person.<br /><br />The send count and propagation count values cannot both be set to greater than 1 at the same time.</div> 68 <a name="function" id="function"> 69<h2>Member Functions</h2> 70 <div class="section"> 71 <table class="members"> 72 <tr> 73<th class="category" colspan="3">New Message Creation</th> 74 </tr> 75 <tr> 76 <td width="100"> </td> 77 <th> 78<a href="../../../../nn/cec/CTR/Message/NewMessage.html"><CODE>NewMessage</CODE></a> 79 </th> 80<td>Creates a new <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 81 </tr> 82 <tr> 83<th class="category" colspan="3">Parameters</th> 84 </tr> 85 <tr> 86 <td width="100"> </td> 87 <th> 88<a href="../../../../nn/cec/CTR/Message/GetCecTitleId.html"><CODE>GetCecTitleId</CODE></a> 89 </th> 90<td>Gets the StreetPass ID of the <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>.</td> 91 </tr> 92 <tr> 93 <td width="100"> </td> 94 <th> 95<a href="../../../../nn/cec/CTR/Message/SetGroupID.html"><CODE>SetGroupID</CODE></a> 96 </th> 97<td>Sets the Group ID for a <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>. <a href="../../../../nn/cec/CTR/Message/Overview.html">Messages</a> in the outbox with the same <CODE>GroupID</CODE> are grouped and sent together.</td> 98 </tr> 99 <tr> 100 <td width="100"> </td> 101 <th> 102<a href="../../../../nn/cec/CTR/Message/GetGroupID.html"><CODE>GetGroupID</CODE></a> 103 </th> 104<td>Gets the Group ID of a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>. <a href="../../../../nn/cec/CTR/Message/Overview.html">Messages</a> in the outbox with the same <CODE>GroupID</CODE> are grouped and sent together.</td> 105 </tr> 106 <tr> 107 <td width="100"> </td> 108 <th> 109<a href="../../../../nn/cec/CTR/Message/GetMessSize.html"><CODE>GetMessSize</CODE></a> 110 </th> 111<td>Gets the size of a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 112 </tr> 113 <tr> 114 <td width="100"> </td> 115 <th> 116<a href="../../../../nn/cec/CTR/Message/GetMessageSize.html"><CODE>GetMessageSize</CODE></a> 117 </th> 118<td>Gets the size of a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 119 </tr> 120 <tr> 121 <td width="100"> </td> 122 <th> 123<a href="../../../../nn/cec/CTR/Message/GetHeaderSize.html"><CODE>GetHeaderSize</CODE></a> 124 </th> 125<td>Gets the size of a message header (including the extended header).</td> 126 </tr> 127 <tr> 128 <td width="100"> </td> 129 <th> 130<a href="../../../../nn/cec/CTR/Message/GetBodySize.html"><CODE>GetBodySize</CODE></a> 131 </th> 132<td>Gets the size of the body of a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 133 </tr> 134 <tr> 135 <td width="100"> </td> 136 <th> 137<a href="../../../../nn/cec/CTR/Message/GetMessageId.html"><CODE>GetMessageId</CODE></a> 138 </th> 139<td>Gets the <CODE>MessageID</CODE> for a <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>. The <CODE>MessageID</CODE> is assigned when a message is created and then saved.</td> 140 </tr> 141 <tr> 142 <td width="100"> </td> 143 <th> 144<a href="../../../../nn/cec/CTR/Message/GetMessageId_Pair.html"><CODE>GetMessageId_Pair</CODE></a> 145 </th> 146<td>Gets the <CODE>MessageID</CODE> for the exchanged <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>. If communication takes place with the "exchange" mode specified, the message ID of the message sent by the other peer (forming the pair) is recorded in the received message.</td> 147 </tr> 148 <tr> 149 <td width="100"> </td> 150 <th> 151<a href="../../../../nn/cec/CTR/Message/SetMessageTypeFlag.html"><CODE>SetMessageTypeFlag</CODE></a> 152 </th> 153<td>Specifies the recipients using the <a href="../../../../nn/cec/CTR/MessageTypeFlag.html"><CODE>MessageTypeFlag</CODE></a> enumerated type.</td> 154 </tr> 155 <tr> 156 <td width="100"> </td> 157 <th> 158<a href="../../../../nn/cec/CTR/Message/GetMessageTypeFlag.html"><CODE>GetMessageTypeFlag</CODE></a> 159 </th> 160<td>Gets the value specified for the message to be sent.</td> 161 </tr> 162 <tr> 163 <td width="100"> </td> 164 <th> 165<a href="../../../../nn/cec/CTR/Message/SetSendMode.html"><CODE>SetSendMode</CODE></a> 166 </th> 167<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.</td> 168 </tr> 169 <tr> 170 <td width="100"> </td> 171 <th> 172<a href="../../../../nn/cec/CTR/Message/GetSendMode.html"><CODE>GetSendMode</CODE></a> 173 </th> 174<td>Gets the send mode (receive only, send only, send and receive, or exchange).</td> 175 </tr> 176 <tr> 177 <td width="100"> </td> 178 <th> 179<a href="../../../../nn/cec/CTR/Message/GetSendDate.html"><CODE>GetSendDate</CODE></a> 180 </th> 181<td>Gets the timestamp of when a received <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a> was sent (when StreetPass occurred). This is the time according to the sender's clock.</td> 182 </tr> 183 <tr> 184 <td width="100"> </td> 185 <th> 186<a href="../../../../nn/cec/CTR/Message/GetRecvDate.html"><CODE>GetRecvDate</CODE></a> 187 </th> 188<td>Gets the timestamp of when a received <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a> was received (when StreetPass occurred). This is the time according to the recipient's clock.</td> 189 </tr> 190 <tr> 191 <td width="100"> </td> 192 <th> 193<a href="../../../../nn/cec/CTR/Message/GetCreateDate.html"><CODE>GetCreateDate</CODE></a> 194 </th> 195<td>Gets the creation timestamp of a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 196 </tr> 197 <tr> 198 <td width="100"> </td> 199 <th> 200<a href="../../../../nn/cec/CTR/Message/SetSendCount.html"><CODE>SetSendCount</CODE></a> 201 </th> 202<td>Specifies the send count. The send count is decremented by one with each send. The data is no longer sent once the count reaches zero.</td> 203 </tr> 204 <tr> 205 <td width="100"> </td> 206 <th> 207<a href="../../../../nn/cec/CTR/Message/GetSendCount.html"><CODE>GetSendCount</CODE></a> 208 </th> 209<td>Gets the send count. The send count is decremented by one with each send. The data is no longer sent once the count reaches zero.</td> 210 </tr> 211 <tr> 212 <td width="100"> </td> 213 <th> 214<a href="../../../../nn/cec/CTR/Message/SetPropagationCount.html"><CODE>SetPropagationCount</CODE></a> 215 </th> 216<td>Specifies the propagation count. The propagation count is decremented by one upon reception. The data is copied to the outbox if the count is still <CODE>1</CODE> or greater.</td> 217 </tr> 218 <tr> 219 <td width="100"> </td> 220 <th> 221<a href="../../../../nn/cec/CTR/Message/GetPropagationCount.html"><CODE>GetPropagationCount</CODE></a> 222 </th> 223<td>Gets the propagation count. The propagation count is decremented by one upon reception. The data is copied to the outbox if the count is still <CODE>1</CODE> or greater.</td> 224 </tr> 225 <tr> 226 <td width="100"> </td> 227 <th> 228<a href="../../../../nn/cec/CTR/Message/SetTag.html"><CODE>SetTag</CODE></a> 229 </th> 230<td>Sets the 16-bit value in the header of the <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>.</td> 231 </tr> 232 <tr> 233 <td width="100"> </td> 234 <th> 235<a href="../../../../nn/cec/CTR/Message/GetTag.html"><CODE>GetTag</CODE></a> 236 </th> 237<td>Gets the <CODE>Tag</CODE> value from the header of a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 238 </tr> 239 <tr> 240 <td width="100"> </td> 241 <th> 242<a href="../../../../nn/cec/CTR/Message/SetExHeader.html"><CODE>SetExHeader</CODE></a> 243 </th> 244<td>Sets the extended header data for a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 245 </tr> 246 <tr> 247 <td width="100"> </td> 248 <th> 249<a href="../../../../nn/cec/CTR/Message/GetExHeader.html"><CODE>GetExHeader</CODE></a> 250 </th> 251<td>Gets data from the extended header of a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 252 </tr> 253 <tr> 254 <td width="100"> </td> 255 <th> 256<a href="../../../../nn/cec/CTR/Message/SetIcon.html"><CODE>SetIcon</CODE></a> 257 </th> 258<td>Sets an icon for a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 259 </tr> 260 <tr> 261 <td width="100"> </td> 262 <th> 263<a href="../../../../nn/cec/CTR/Message/GetIcon.html"><CODE>GetIcon</CODE></a> 264 </th> 265<td>Gets an icon from a <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>.</td> 266 </tr> 267 <tr> 268 <td width="100"> </td> 269 <th> 270<a href="../../../../nn/cec/CTR/Message/SetInfoText.html"><CODE>SetInfoText</CODE></a> 271 </th> 272<td>Sets the information text of a <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>.</td> 273 </tr> 274 <tr> 275 <td width="100"> </td> 276 <th> 277<a href="../../../../nn/cec/CTR/Message/GetInfoText.html"><CODE>GetInfoText</CODE></a> 278 </th> 279<td>Gets the description of a <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>.</td> 280 </tr> 281 <tr> 282 <td width="100"> </td> 283 <th> 284<a href="../../../../nn/cec/CTR/Message/SetMessageBody.html"><CODE>SetMessageBody</CODE></a> 285 </th> 286<td>Sets the data body of a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 287 </tr> 288 <tr> 289 <td width="100"> </td> 290 <th> 291<a href="../../../../nn/cec/CTR/Message/GetMessageBody.html"><CODE>GetMessageBody</CODE></a> 292 </th> 293<td>Gets the body data of a <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>.</td> 294 </tr> 295 <tr> 296 <td width="100"> </td> 297 <th> 298<a href="../../../../nn/cec/CTR/Message/GetMessageBodyPointer.html"><CODE>GetMessageBodyPointer</CODE></a> 299 </th> 300<td>Gets a pointer to the body data of a <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>.</td> 301 </tr> 302 <tr> 303<th class="category" colspan="3">Other</th> 304 </tr> 305 <tr> 306 <td width="100"> </td> 307 <th> 308<a href="../../../../nn/cec/CTR/Message/Message.html"><CODE>Message</CODE></a> 309 </th> 310<td>Constructor.</td> 311 </tr> 312 <tr> 313 <td width="100"> </td> 314 <th> 315<a href="../../../../nn/cec/CTR/Message/~Message.html">~Message</a> 316 </th> 317<td>Destructor.</td> 318 </tr> </table> 319 </div> 320 </a> 321<h2>Revision History</h2> 322 <div class="section"> 323 <dl class="history"> 324 <dt>2011/03/11</dt> 325<dd>Added information about parameters set in messages. Fixed broken links.<br /> 326 </dd> 327 <dt>2010/08/16</dt> 328<dd>Initial version.<br /> 329 </dd> 330 </dl> 331 </div> 332 <hr><p>CONFIDENTIAL</p></body> 333</html> 334