#include <nitro/mb/mb_fake_child.h>
typedef BOOL (*MBFakeCompareGGIDCallbackFunc) (WMStartScanCallback *arg, u32 defaultGGID);
| Arguments | Description |
| arg | Pointer to the WMStartScanCallback structure storing the beacon information obtained by scanning. |
| defaultGGID | GGID specified by the MB_FakeStartScanParent function. Passed as an argument for more convenient implementation of the callback. |
Returns TRUE if the obtained beacon matches the search criteria; FALSE if it does not match.
This is a function prototype for the user-defined callback specified with the MB_FakeSetCompareGGIDCallback 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.
Example:
/* If you want two kinds of GGID to be the search target */
static BOOL GGIDComparator(WMStartScanCallback *arg, u32 defaultGGID)
{
(void)defaultGGID;
return (arg->gameInfo.ggid == ggid1) || (arg->gameInfo.ggid == ggid2);
}
...
MB_FakeInit(mbfBuf, &userInfo);
MB_FakeSetCompareGGIDCallback(GGIDComparator);
MB_FakeStartScanParent(NotifyScanParent, ggid1/* merely ignored in this example */);
...
MB_FakeStartScanParent, MB_FakeSetCompareGGIDCallback
2007/04/18 Initial version.
CONFIDENTIAL