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 22 span.virtual_style 23 { 24 font-size : 8pt; 25 color : white; 26 font-weight : bold; 27 background : #0a0; 28 border-left : solid 1px #0f0; 29 border-top : solid 1px #0f0; 30 border-right : solid 1px #060; 31 border-bottom : solid 1px #060; 32 padding-left : 2px; 33 padding-right : 2px; 34 } 35 36 span.protected_style 37 { 38 font-size : 8pt; 39 color : white; 40 font-weight : bold; 41 background : #444; 42 border-left : solid 1px #ccc; 43 border-top : solid 1px #ccc; 44 border-right : solid 1px #222; 45 border-bottom : solid 1px #222; 46 padding-left : 2px; 47 padding-right : 2px; 48 } 49 --></style> 50<title>nn::cec::CTR::Message</title> 51 </head> 52 <body> 53<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> 54<h2>Syntax</h2> 55 <div class="section"> 56 <pre class="definition">class Message</pre> 57 </div> 58<h2>Description</h2> 59 <div class="section"> 60<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> 61 62 The parameters set in messages placed in the outbox affect the message behavior, such as the search conditions for communication peers.<br />You can set multiple messages in the outbox, but the parameters set to the first message are the parameters that are used as conditions. When a message is sent successfully, that message is moved to the end of the queue. 63 64 <h4><CODE>MessageID</CODE></h4> 65 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> 66 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>. 67 68 <h4><CODE>MessageTypeFlag</CODE></h4> 69 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> 70 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> 71 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 />If you specify <CODE>MESSAGE_SENDCOUNT_UNLIMITED</CODE> to the send count, this value is not decremented and the data are sent repeatedly.<br />If the data do not reach the peer because communications have been interrupted or for some other reason, the send count is not decremented.<br />The message remains in the outbox even after it has been sent and its send count is 0.<br />When the send count for all messages in an outbox reaches 0, sending from that box stops.<br /><h4>Propagation count.</h4> 72 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> 73 <a name="function" id="function"> 74<h2>Member Functions</h2> 75 <div class="section"> 76 <table class="members"> 77 <tr> 78<th class="category" colspan="3">New Message Creation</th> 79 </tr> 80 <tr> 81 <td width="100"> </td> 82 <th> 83<a href="../../../../nn/cec/CTR/Message/NewMessage.html"><CODE>NewMessage</CODE></a> 84 </th> 85<td>Creates a new <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 86 </tr> 87 <tr> 88<th class="category" colspan="3">Parameters</th> 89 </tr> 90 <tr> 91 <td width="100"> </td> 92 <th> 93<a href="../../../../nn/cec/CTR/Message/GetCecTitleId.html"><CODE>GetCecTitleId</CODE></a> 94 </th> 95<td>Gets the StreetPass ID of the <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>.</td> 96 </tr> 97 <tr> 98 <td width="100"> </td> 99 <th> 100<a href="../../../../nn/cec/CTR/Message/SetGroupID.html"><CODE>SetGroupID</CODE></a> 101 </th> 102<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> 103 </tr> 104 <tr> 105 <td width="100"> </td> 106 <th> 107<a href="../../../../nn/cec/CTR/Message/GetGroupID.html"><CODE>GetGroupID</CODE></a> 108 </th> 109<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> 110 </tr> 111 <tr> 112 <td width="100"> </td> 113 <th> 114<a href="../../../../nn/cec/CTR/Message/GetMessSize.html"><CODE>GetMessSize</CODE></a> 115 </th> 116<td>Gets the size of a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 117 </tr> 118 <tr> 119 <td width="100"> </td> 120 <th> 121<a href="../../../../nn/cec/CTR/Message/GetMessageSize.html"><CODE>GetMessageSize</CODE></a> 122 </th> 123<td>Gets the size of a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 124 </tr> 125 <tr> 126 <td width="100"> </td> 127 <th> 128<a href="../../../../nn/cec/CTR/Message/GetHeaderSize.html"><CODE>GetHeaderSize</CODE></a> 129 </th> 130<td>Gets the size of a message header (including the extended header).</td> 131 </tr> 132 <tr> 133 <td width="100"> </td> 134 <th> 135<a href="../../../../nn/cec/CTR/Message/GetBodySize.html"><CODE>GetBodySize</CODE></a> 136 </th> 137<td>Gets the size of the body of a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 138 </tr> 139 <tr> 140 <td width="100"> </td> 141 <th> 142<a href="../../../../nn/cec/CTR/Message/GetMessageId.html"><CODE>GetMessageId</CODE></a> 143 </th> 144<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> 145 </tr> 146 <tr> 147 <td width="100"> </td> 148 <th> 149<a href="../../../../nn/cec/CTR/Message/GetMessageId_Pair.html"><CODE>GetMessageId_Pair</CODE></a> 150 </th> 151<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> 152 </tr> 153 <tr> 154 <td width="100"> </td> 155 <th> 156<a href="../../../../nn/cec/CTR/Message/SetMessageTypeFlag.html"><CODE>SetMessageTypeFlag</CODE></a> 157 </th> 158<td>Specifies the recipients using the <a href="../../../../nn/cec/CTR/MessageTypeFlag.html"><CODE>MessageTypeFlag</CODE></a> enumerated type.</td> 159 </tr> 160 <tr> 161 <td width="100"> </td> 162 <th> 163<a href="../../../../nn/cec/CTR/Message/GetMessageTypeFlag.html"><CODE>GetMessageTypeFlag</CODE></a> 164 </th> 165<td>Gets the value specified for the message to be sent.</td> 166 </tr> 167 <tr> 168 <td width="100"> </td> 169 <th> 170<a href="../../../../nn/cec/CTR/Message/SetSendMode.html"><CODE>SetSendMode</CODE></a> 171 </th> 172<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> 173 </tr> 174 <tr> 175 <td width="100"> </td> 176 <th> 177<a href="../../../../nn/cec/CTR/Message/GetSendMode.html"><CODE>GetSendMode</CODE></a> 178 </th> 179<td>Gets the send mode (receive only, send only, send and receive, or exchange).</td> 180 </tr> 181 <tr> 182 <td width="100"> </td> 183 <th> 184<a href="../../../../nn/cec/CTR/Message/GetSendDate.html"><CODE>GetSendDate</CODE></a> 185 </th> 186<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> 187 </tr> 188 <tr> 189 <td width="100"> </td> 190 <th> 191<a href="../../../../nn/cec/CTR/Message/GetRecvDate.html"><CODE>GetRecvDate</CODE></a> 192 </th> 193<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> 194 </tr> 195 <tr> 196 <td width="100"> </td> 197 <th> 198<a href="../../../../nn/cec/CTR/Message/GetCreateDate.html"><CODE>GetCreateDate</CODE></a> 199 </th> 200<td>Gets the creation timestamp of a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 201 </tr> 202 <tr> 203 <td width="100"> </td> 204 <th> 205<a href="../../../../nn/cec/CTR/Message/SetSendCount.html"><CODE>SetSendCount</CODE></a> 206 </th> 207<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> 208 </tr> 209 <tr> 210 <td width="100"> </td> 211 <th> 212<a href="../../../../nn/cec/CTR/Message/GetSendCount.html"><CODE>GetSendCount</CODE></a> 213 </th> 214<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> 215 </tr> 216 <tr> 217 <td width="100"> </td> 218 <th> 219<a href="../../../../nn/cec/CTR/Message/SetPropagationCount.html"><CODE>SetPropagationCount</CODE></a> 220 </th> 221<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> 222 </tr> 223 <tr> 224 <td width="100"> </td> 225 <th> 226<a href="../../../../nn/cec/CTR/Message/GetPropagationCount.html"><CODE>GetPropagationCount</CODE></a> 227 </th> 228<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> 229 </tr> 230 <tr> 231 <td width="100"> </td> 232 <th> 233<a href="../../../../nn/cec/CTR/Message/SetTag.html"><CODE>SetTag</CODE></a> 234 </th> 235<td>Sets the 16-bit value in the header of the <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>.</td> 236 </tr> 237 <tr> 238 <td width="100"> </td> 239 <th> 240<a href="../../../../nn/cec/CTR/Message/GetTag.html"><CODE>GetTag</CODE></a> 241 </th> 242<td>Gets the <CODE>Tag</CODE> value from the header of a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 243 </tr> 244 <tr> 245 <td width="100"> </td> 246 <th> 247<a href="../../../../nn/cec/CTR/Message/SetExHeader.html"><CODE>SetExHeader</CODE></a> 248 </th> 249<td>Sets the extended header data for a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 250 </tr> 251 <tr> 252 <td width="100"> </td> 253 <th> 254<a href="../../../../nn/cec/CTR/Message/GetExHeader.html"><CODE>GetExHeader</CODE></a> 255 </th> 256<td>Gets data from the extended header of a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 257 </tr> 258 <tr> 259 <td width="100"> </td> 260 <th> 261<a href="../../../../nn/cec/CTR/Message/SetIcon.html"><CODE>SetIcon</CODE></a> 262 </th> 263<td>Sets an icon for a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 264 </tr> 265 <tr> 266 <td width="100"> </td> 267 <th> 268<a href="../../../../nn/cec/CTR/Message/GetIcon.html"><CODE>GetIcon</CODE></a> 269 </th> 270<td>Gets an icon from a <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>.</td> 271 </tr> 272 <tr> 273 <td width="100"> </td> 274 <th> 275<a href="../../../../nn/cec/CTR/Message/SetInfoText.html"><CODE>SetInfoText</CODE></a> 276 </th> 277<td>Sets the information text of a <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>.</td> 278 </tr> 279 <tr> 280 <td width="100"> </td> 281 <th> 282<a href="../../../../nn/cec/CTR/Message/GetInfoText.html"><CODE>GetInfoText</CODE></a> 283 </th> 284<td>Gets the description of a <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>.</td> 285 </tr> 286 <tr> 287 <td width="100"> </td> 288 <th> 289<a href="../../../../nn/cec/CTR/Message/SetMessageBody.html"><CODE>SetMessageBody</CODE></a> 290 </th> 291<td>Sets the data body of a <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a>.</td> 292 </tr> 293 <tr> 294 <td width="100"> </td> 295 <th> 296<a href="../../../../nn/cec/CTR/Message/GetMessageBody.html"><CODE>GetMessageBody</CODE></a> 297 </th> 298<td>Gets the body data of a <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>.</td> 299 </tr> 300 <tr> 301 <td width="100"> </td> 302 <th> 303<a href="../../../../nn/cec/CTR/Message/GetMessageBodyPointer.html"><CODE>GetMessageBodyPointer</CODE></a> 304 </th> 305<td>Gets a pointer to the body data of a <a href="../../../../nn/cec/CTR/Message/Overview.html">Message</a>.</td> 306 </tr> 307 <tr> 308<th class="category" colspan="3">Other</th> 309 </tr> 310 <tr> 311 <td width="100"> </td> 312 <th> 313<a href="../../../../nn/cec/CTR/Message/Message.html"><CODE>Message</CODE></a> 314 </th> 315<td>Constructor.</td> 316 </tr> 317 <tr> 318 <td width="100"> </td> 319 <th> 320<a href="../../../../nn/cec/CTR/Message/~Message.html">~Message</a> 321 </th> 322<td>Destructor.</td> 323 </tr> </table> 324 </div> 325 </a> 326<h2>Revision History</h2> 327 <div class="section"> 328 <dl class="history"> 329 <dt>2011/03/11</dt> 330<dd>Added information about parameters set in messages. Fixed broken links.<br /> 331 </dd> 332 <dt>2010/08/16</dt> 333<dd>Initial version.<br /> 334 </dd> 335 </dl> 336 </div> 337 <hr><p>CONFIDENTIAL</p></body> 338</html>