1 /*---------------------------------------------------------------------------* 2 Project: TwlSDK - MB - include 3 File: mb_fake_child.h 4 5 Copyright 2007-2008 Nintendo. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Date:: 2008-09-17#$ 14 $Rev: 8556 $ 15 $Author: okubata_ryoma $ 16 *---------------------------------------------------------------------------*/ 17 18 #ifndef NITRO_MB_MB_FAKE_CHILD_H_ 19 #define NITRO_MB_MB_FAKE_CHILD_H_ 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 #include <nitro/types.h> 26 #include <nitro/mb/mb.h> 27 28 // 29 // This is the size of the work buffer needed as a MB_FakeInit() argument. 30 #define MB_FAKE_WORK_SIZE (0x5f20) 31 32 enum 33 { 34 MB_FAKESCAN_PARENT_FOUND, 35 MB_FAKESCAN_PARENT_LOST, 36 MB_FAKESCAN_API_ERROR, 37 MB_FAKESCAN_END_SCAN, 38 MB_FAKESCAN_PARENT_BEACON 39 }; 40 41 /* 42 * Notification callback for the scan parent 43 */ 44 typedef struct 45 { 46 u16 index; // Index for managing obtained parent devices 47 u16 padding; 48 MBGameInfo *gameInfo; // Parent game information 49 WMBssDesc *bssDesc; // Parent connection information 50 } 51 MBFakeScanCallback; 52 53 /* 54 * Error notification callback 55 */ 56 typedef struct 57 { 58 u16 apiid; // API code 59 u16 errcode; // Error Code 60 } 61 MBFakeScanErrorCallback; 62 63 typedef void (*MBFakeScanCallbackFunc) (u16 type, void *arg); 64 typedef BOOL (*MBFakeCompareGGIDCallbackFunc) (WMStartScanCallback *arg, u32 defaultGGID); 65 66 void MB_FakeInit(void *buf, const MBUserInfo *user); 67 void MB_FakeEnd(void); 68 u32 MB_FakeGetWorkSize(void); 69 void MB_FakeSetCStateCallback(MBCommCStateCallbackFunc callback); 70 void MB_FakeStartScanParent(MBFakeScanCallbackFunc callback, u32 ggid); 71 void MB_FakeEndScan(void); 72 BOOL MB_FakeEntryToParent(u16 index); 73 BOOL MB_FakeGetParentGameInfo(u16 index, MBGameInfo *pGameInfo); 74 BOOL MB_FakeGetParentBssDesc(u16 index, WMBssDesc *pBssDesc); 75 BOOL MB_FakeReadParentBssDesc(u16 index, WMBssDesc *pBssDesc, u16 parent_max_size, 76 u16 child_max_size, BOOL ks_flag, BOOL cs_flag); 77 void MB_FakeSetVerboseScanCallback(WMCallbackFunc callback); 78 void MB_FakeSetCompareGGIDCallback(MBFakeCompareGGIDCallbackFunc callback); 79 80 81 #ifdef __cplusplus 82 } 83 #endif 84 85 86 #endif // NITRO_MB_MB_FAKE_CHILD_H_ 87