/*---------------------------------------------------------------------------* Project: MP DS download play library File: mpdl.h Copyright 2006 Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Log: mpdl.h,v $ Revision 1.9 2007/10/11 06:39:16 yosizaki Support for custom-banner. Revision 1.8 2007/04/27 03:44:00 yosizaki Added MPDLRegistrationList declaration. Revision 1.7 2007/02/16 06:28:35 yosizaki Changed type of the playerbits (from int to u32) Revision 1.6 2006/08/25 02:05:03 yosizaki Added some functions. Revision 1.5 2006/08/23 08:55:37 yosizaki Added some functions. Revision 1.4 2006/08/14 14:41:55 yasu Support for PADDING warnings. Revision 1.3 2006/07/07 03:12:49 yosizaki Added MPDLEnableFlag. Revision 1.2 2006/07/05 07:52:27 yosizaki Changed type of some members in MPDLConfig. Revision 1.1 2006/07/03 23:47:37 yosizaki Initial upload. $NoKeywords: $ *---------------------------------------------------------------------------*/ #ifndef REVOLUTION_MPDL_H__ #define REVOLUTION_MPDL_H__ #include #include #ifdef __cplusplus extern "C" { #endif /*===========================================================================*/ /* Constants */ #define MPDL_PLAYER_NAME_MAX 10 /* 10 or fewer characters in UTF16-LE */ extern const char *MPDLRegistrationList; /*===========================================================================*/ /* Declarations */ typedef struct MPDLPlayerInfo { int aid; int color; u16 name_length; u16 name[MPDL_PLAYER_NAME_MAX]; u8 mac[6]; int progress; } MPDLPlayerInfo; #pragma warn_padding off typedef struct MPDLConfig { void* (*alloc)(u32 size); void (*free) (void* ptr); OSPriority threadPriority; u32 ggid; u32 tgid; u32 channel; u8 serverColor; // 3-byte padding const u16 *serverName; const u16 *programTitle; const u16 *programComment; u32 programMaxEntry; const u8 *programImage; const void *bannerCharacter; const void *bannerPalette; void *internalWork1; void *internalWork2; BOOL entry_flag; BOOL mb_flag; u32 bitmap; MPConfig mpConfig[1]; } MPDLConfig; #pragma warn_padding reset /*===========================================================================*/ /* Functions */ /*---------------------------------------------------------------------------* Name : MPDLStartup Description : Initializes and starts MP communications for downloading Arguments : config - Download settings Returns : s32 - Returns the result of the process. Returns a negative number if processing failed. *---------------------------------------------------------------------------*/ s32 MPDLStartup( MPDLConfig* config ); /*---------------------------------------------------------------------------* Name : MPDLCleanup Description : Terminates MP communications for downloading. Arguments : None Returns : s32 - Returns the result of the process. Returns a negative number if processing failed. *---------------------------------------------------------------------------*/ s32 MPDLCleanup( void ); /*---------------------------------------------------------------------------* Name : MPDLIsAvailable Description : Determines whether the MPDL library process has started and if the library is available. Arguments : None Returns : BOOL - TRUE if the MPDLStartup function has already been called. *---------------------------------------------------------------------------*/ BOOL MPDLIsAvailable( void ); /*---------------------------------------------------------------------------* Name : MPDLStartDownload Description : Closes download entries and starts the download process. Arguments : None Returns : int - Bitmap representing current entry player status. (at the close of download entry) *---------------------------------------------------------------------------*/ u32 MPDLStartDownload( void ); /*---------------------------------------------------------------------------* Name : MPDLGetPlayerInfo Description : Gets current entry or already downloaded player information. Arguments : aid - Player AID (the Wii acting as parent is 0) dst - Structure that stores player information Returns : BOOL - If the AID is valid, store the information and return TRUE. If not, return FALSE. *---------------------------------------------------------------------------*/ BOOL MPDLGetPlayerInfo( int aid, MPDLPlayerInfo* dst ); /*---------------------------------------------------------------------------* Name : MPDLGetEntryBitmap Description : Gets the player status for current entry player status as a bitmap. Arguments : None Returns : int - Bitmap representing current entry player status. *---------------------------------------------------------------------------*/ u32 MPDLGetEntryBitmap( void ); /*---------------------------------------------------------------------------* Name : MPDLGetBootedBitmap Description : Gets download complete player status as a bitmap. Arguments : None Returns : int - Bitmap representing download complete player status. *---------------------------------------------------------------------------*/ u32 MPDLGetBootedBitmap( void ); /* internal functions -------------------------------------------------------*/ /*---------------------------------------------------------------------------* Name : MPDLEnableFlag Description : Controls the communication beacon flag. Arguments : entry - Controls entry flag (always true under normal conditions) mb - Controls MB flag (always true under normal conditions) Returns : None. *---------------------------------------------------------------------------*/ void MPDLEnableFlag( BOOL entry, BOOL mb ); /*===========================================================================*/ #ifdef __cplusplus } #endif #endif /* REVOLUTION_MP_H__ */ /*---------------------------------------------------------------------------* End of file *---------------------------------------------------------------------------*/