1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META http-equiv="Content-Style-Type" content="text/css"> 6<TITLE>NWC24 Search Function Introduction</TITLE> 7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 8</HEAD> 9<BODY> 10<H1>NWC24 Message Search Function</H1> 11 12<H2>Introduction</H2> 13<P> 14The NWC24 message search function searches the management information in the message box, finds those message objects that meet certain specified conditions, and then expands the obtained results in an array using a simple procedure. 15</P> 16 17<H2>Basic Operations</H2> 18<P> 19For example, to obtain four <A HREF="../Types/NWC24MsgObj.html"><CODE>NWC24MsgObj</CODE></A> messages in the inbox, use the following process: 20</P> 21<TABLE border="1" width="80%"> 22 <TBODY> 23 <TR> 24 <TD width="100%"> 25 <PRE><CODE>NWC24MsgObj msgObjArray[4]; 26 27void GetMsgObjs( void ) 28{ 29 u32 numStored, numRemain; 30 31 NWC24InitSearchConds(); 32 NWC24SearchMsgs(msgObjArray, 4, &numStored, &numRemain); 33}</CODE></PRE></TD> 34 </TR> 35 </TBODY> 36</TABLE> 37<P> 38By doing this, the data corresponding to the message in the inbox is stored in <A HREF="../Types/NWC24MsgObj.html">NWC24MsgObj type</A> <CODE>msgObjArray</CODE>. The actual number obtained in the array is returned in <CODE>numStored</CODE>, specified with the third argument of <A HREF="NWC24SearchMsgs.html"><CODE>NWC24SearchMsgs()</CODE></A>, and the remainder is returned in <CODE>numRemain</CODE>. When a numerical value equal to or greater than 1 is returned in <CODE>numRemain</CODE>, calling <A HREF="NWC24SearchMsgs.html"><CODE>NWC24SearchMsgs()</CODE></A> again allows the remaining portion to be obtained in the array. (If called until <CODE>numRemain</CODE> becomes zero, all of the messages in the inbox can be obtained.) 39</P> 40<P> 41<A HREF="NWC24InitSearchConds.html"><CODE>NWC24InitSearchConds()</CODE></A> must be called to redo obtaining messages from the beginning. 42</P> 43 44<H2>Simple Search Feature</H2> 45<P> 46Search can also occur by specifying simple filtering conditions. 47</P> 48<TABLE border="1" width="80%"> 49 <TBODY> 50 <TR> 51 <TD width="100%"> 52 <PRE><CODE>NWC24MsgObj msgObjArray[4]; 53 54void SearchMsgObjs( void ) 55{ 56 u32 numStored, numRemain; 57 58 NWC24InitSearchConds(); 59 NWC24SetSearchCondFromAddrId(0123456701234567ULL); 60 NWC24SearchMsgs(msgObjArray, 4, &numStored, &numRemain); 61}</CODE></PRE> 62</TD> 63 </TR> 64 </TBODY> 65</TABLE> 66<P> 67By doing this, only the Wii messages from the specified Wii number are obtained to the array. 68</P> 69<P> 70In addition, the following search conditions can currently be specified: 71 <UL> 72<LI><P><A HREF="NWC24SetSearchCondMsgBox.html"><CODE>NWC24SetSearchCondMsgBox()</CODE></A><BR>Specifies the message box to be searched.</P> 73<LI><P><A HREF="NWC24SetSearchCondForMenu.html"><CODE>NWC24SetSearchCondForMenu()</CODE></A><BR>Specifies only items that are displayed on the console menu as the search condition.</P> 74<LI><P><A HREF="NWC24SetSearchCondPublic.html">NWC24SetSearchCondPublic()</A><BR>Specifies whether to include Public messages in the search targets.</P> 75<LI><P><A HREF="NWC24SetSearchCondAppId.html"><CODE>NWC24SetSearchCondAppId()</CODE></A><BR>Specifies the ID of the application that sent the messages.</P> 76<LI><P><A HREF="NWC24SetSearchCondGroupId.html"><CODE>NWC24SetSearchCondGroupId()</CODE></A><BR>Specifies the group ID of the application that sent the messages.</P> 77<LI><P><A HREF="NWC24SetSearchCondTag.html"><CODE>NWC24SetSearchCondTag()</CODE></A><BR>Specifies the tag number of the message.</P> 78 </UL> 79</P> 80<P> 81Several conditions may be specified. In this case, they are refined using the AND condition. To redo the search with different conditions, be sure to first call <A HREF="NWC24InitSearchConds.html"><CODE>NWC24InitSearchConds()</CODE></A>. The conditions must all be cleared once. 82</P> 83<P> 84By default, the Inbox is searched for all messages that can be read by the application and are not Public messages. This includes messages bound for the Message Board and for other applications, which other applications have permission to read. 85</P> 86 87<H2>Message Search API</H2> 88<P> 89The following functions are provided as an API for performing message searches. 90</P> 91<P> 92 <UL> 93<LI><A HREF="NWC24InitSearchConds.html"><CODE>NWC24InitSearchConds</CODE></A> Initializes the search process and clears conditions. 94<LI><A HREF="NWC24SetSearchCondMsgBox.html"><CODE>NWC24SetSearchCondMsgBox</CODE></A> Specifies search conditions (message box). 95<LI><A HREF="NWC24SetSearchCondForMenu.html"><CODE>NWC24SetSearchCondForMenu</CODE></A> Specifies search conditions (menu display). 96<LI><A HREF="NWC24SetSearchCondPublic.html"><CODE>NWC24SetSearchCondPublic</CODE></A> Specifies search conditions (public messages) 97<LI><A HREF="NWC24SetSearchCondFromAddrId.html"><CODE>NWC24SetSearchCondFromAddrId</CODE></A> Specifies search conditions (sender's Wii number). 98<LI><A HREF="NWC24SetSearchCondAppId.html"><CODE>NWC24SetSearchCondAppId</CODE></A> Specifies search conditions (application ID). 99<LI><A HREF="NWC24SetSearchCondGroupId.html"><CODE>NWC24SetSearchCondGroupId</CODE></A> Specifies search conditions (group IDs). 100<LI><A HREF="NWC24SetSearchCondTag.html"><CODE>NWC24SetSearchCondTag</CODE></A> Specifies search conditions (tag number). 101<LI><A HREF="NWC24SearchMsgs.html"><CODE>NWC24SearchMsgs</CODE></A> Executes search and stores the results in an array. 102 </UL> 103</P> 104<P> 105For details, see the reference manual for each function. 106</P> 107 108<H2>Revision History</H2> 109 110<P> 1112008/05/01 Added the <CODE>NWC24SetSearchCondGroupId</CODE> function. <BR>2007/09/03 Added the <CODE>NWC24SetSearchCondPublic</CODE> function. <BR>2007/07/26 Explained searching for tag numbers. <BR>2007/05/03 Fixed omissions (in the original Japanese). <BR>2006/09/01 Initial version. 112</P> 113 114<hr><p>CONFIDENTIAL</p></body> 115</HTML>