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, &amp;numStored, &amp;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, &amp;numStored, &amp;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="NWC24SetSearchCondTag.html">NWC24SetSearchCondTag()</A><BR>Specifies the tag number in the message as a search condition.</P>
77  </UL>
78</P>
79<P>
80Several 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.
81</P>
82<P>
83By 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.
84</P>
85
86<H2>Message Search API</H2>
87<P>
88The following functions are provided as an API for performing message searches.
89</P>
90<P>
91  <UL>
92<LI><A HREF="NWC24InitSearchConds.html"><CODE>NWC24InitSearchConds</CODE></A> : initializes the search process and clears conditions.
93<LI><A HREF="NWC24SetSearchCondMsgBox.html"><CODE>NWC24SetSearchCondMsgBox</CODE></A> : Specifies search conditions (message box).
94<LI><A HREF="NWC24SetSearchCondForMenu.html"><CODE>NWC24SetSearchCondForMenu</CODE></A> : Specifies search conditions (menu display).
95<LI><A HREF="NWC24SetSearchCondPublic.html"><CODE>NWC24SetSearchCondPublic</CODE></A>: specifies search conditions (public messages)
96<LI><A HREF="NWC24SetSearchCondFromAddrId.html"><CODE>NWC24SetSearchCondFromAddrId</CODE></A> : Specifies search conditions (sender's Wii number).
97<LI><A HREF="NWC24SetSearchCondAppId.html"><CODE>NWC24SetSearchCondAppId</CODE></A> : Specifies search conditions (application ID).
98<LI><A HREF="NWC24SetSearchCondPublic.html"><CODE>NWC24SetSearchCondTag</CODE></A>: specifies search conditions (tag number)
99<LI><A HREF="NWC24SearchMsgs.html"><CODE>NWC24SearchMsgs</CODE></A> : Executes search and stores the results in an array.
100  </UL>
101</P>
102<P>
103For details, see the reference manual for each function.
104</P>
105
106<H2>Revision History</H2>
107
108<P>
1092007/09/03 Added the <CODE>NWC24SetSearchCondPublic</CODE> function.<BR>2007/07/26 Added text about the search for tag numbers.<BR>2007/05/03 Revised omissions (in original Japanese).<BR>2006/09/01 Initial version.
110</P>
111
112<hr><p>CONFIDENTIAL</p></body>
113</HTML>