1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<TITLE>MBFakeCompareGGIDCallbackFunc</TITLE> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MBFakeCompareGGIDCallbackFunc <IMG src="../../image/NTR.gif" width="24" height="12" border="0" align=middle><IMG src="../../image/TWL.gif" width="24" height="12" border="0" align=middle></h1> 15<h2>Definition</h2> 16 17<dl> 18 <dd> 19 <PRE><CODE>#include <nitro/mb/mb_fake_child.h></CODE> 20 21typedef BOOL (*MBFakeCompareGGIDCallbackFunc) (WMStartScanCallback *arg, u32 defaultGGID); 22</PRE> 23 </dd> 24</dl> 25<h2>Arguments</h2> 26<TABLE border="1"> 27 <TBODY> 28 <TR> 29 <TD>Arguments</TD> 30 <TD>Description</TD> 31 </TR> 32 <TR> 33 <TD><B><I>arg</I></B></TD> 34 <TD>Pointer to the <CODE><a href="../../wm/wm/WMStartScanCallback.html">WMStartScanCallback</a></CODE> structure storing the beacon information obtained by scanning.</TD> 35 </TR> 36 <TR> 37 <TD><B><I>defaultGGID</I></B></TD> 38 <TD>GGID specified by the <CODE><A href="MB_FakeStartScanParent.html">MB_FakeStartScanParent</A></CODE> function. <br /> 39 Passed as an argument for more convenient implementation of the callback.</TD> 40 </TR> 41 </TBODY> 42</TABLE> 43<h2>Return Values</h2> 44<p>Returns TRUE if the obtained beacon matches the search criteria; FALSE if it does not match.</p> 45 46<H2>Description</H2> 47<p>This is a function prototype for the user-defined callback specified with the <CODE><A href="MB_FakeSetCompareGGIDCallback.html">MB_FakeSetCompareGGIDCallback</A></CODE> function. The argument passed to this callback function is used to determine whether the beacon is a search target. The result must be reported to the MB library as a return value.</p> 48<p> 49Example: 50<pre><CODE> 51<font color="#008000">/* If you want two kinds of GGID to be the search target */</font> 52static BOOL GGIDComparator(WMStartScanCallback *arg, u32 defaultGGID) 53{ 54 (void)defaultGGID; 55 return (arg->gameInfo.ggid == ggid1) || (arg->gameInfo.ggid == ggid2); 56} 57 58 ... 59 MB_FakeInit(mbfBuf, &userInfo); 60 MB_FakeSetCompareGGIDCallback(GGIDComparator); 61 MB_FakeStartScanParent(NotifyScanParent, ggid1<font color="#008000">/* merely ignored in this example */</font>); 62 ... 63</CODE></pre> 64</p> 65<h2>See Also</h2> 66<p><CODE><A href="MB_FakeStartScanParent.html">MB_FakeStartScanParent</A>, <A href="MB_FakeSetCompareGGIDCallback.html">MB_FakeSetCompareGGIDCallback</A></CODE><BR></CODE></P> 67<H2>Revision History</H2> 68<P> 692007/04/18 Initial version. 70</P> 71<hr><p>CONFIDENTIAL</p></body> 72</html> 73