2016-08-02 00:16:36 +02:00
|
|
|
#pragma once
|
|
|
|
#include <wut.h>
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \defgroup coreinit_mcp MCP IOS Calls
|
|
|
|
* \ingroup coreinit
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2016-08-02 00:22:44 +02:00
|
|
|
typedef struct MCPInstallProgress MCPInstallProgress;
|
|
|
|
typedef struct MCPInstallInfo MCPInstallInfo;
|
|
|
|
typedef struct MCPInstallTitleInfo MCPInstallTitleInfo;
|
2016-08-07 07:03:30 +02:00
|
|
|
typedef struct MCPDevice MCPDevice;
|
|
|
|
typedef struct MCPDeviceList MCPDeviceList;
|
2016-08-02 00:22:44 +02:00
|
|
|
|
2016-08-02 00:16:36 +02:00
|
|
|
typedef enum MCPInstallTarget
|
|
|
|
{
|
|
|
|
MCP_INSTALL_TARGET_MLC = 0,
|
|
|
|
MCP_INSTALL_TARGET_USB = 1,
|
|
|
|
} MCPInstallTarget;
|
|
|
|
|
|
|
|
struct __attribute__((__packed__)) MCPInstallProgress
|
|
|
|
{
|
|
|
|
u32 inProgress;
|
|
|
|
u64 tid;
|
|
|
|
u64 sizeTotal;
|
|
|
|
u64 sizeProgress;
|
|
|
|
u32 contentsTotal;
|
|
|
|
u32 contentsProgress;
|
|
|
|
};
|
|
|
|
CHECK_OFFSET(MCPInstallProgress, 0x04, tid);
|
|
|
|
CHECK_OFFSET(MCPInstallProgress, 0x20, contentsProgress);
|
|
|
|
CHECK_SIZE(MCPInstallProgress, 0x24);
|
|
|
|
|
|
|
|
struct MCPInstallInfo
|
|
|
|
{
|
|
|
|
UNKNOWN(0x27F);
|
|
|
|
};
|
|
|
|
CHECK_SIZE(MCPInstallInfo, 0x27F);
|
|
|
|
|
|
|
|
struct MCPInstallTitleInfo
|
|
|
|
{
|
|
|
|
UNKNOWN(0x27F);
|
|
|
|
};
|
|
|
|
CHECK_SIZE(MCPInstallTitleInfo, 0x27F);
|
|
|
|
|
2016-08-07 07:03:30 +02:00
|
|
|
struct MCPDevice
|
|
|
|
{
|
|
|
|
char name[0x31B];
|
|
|
|
};
|
|
|
|
CHECK_SIZE(MCPDevice, 0x31B);
|
|
|
|
|
|
|
|
struct MCPDeviceList
|
|
|
|
{
|
|
|
|
MCPDevice devices[32];
|
|
|
|
};
|
|
|
|
CHECK_SIZE(MCPDeviceList, 0x31B*32);
|
|
|
|
|
2016-08-02 00:16:36 +02:00
|
|
|
int
|
|
|
|
MCP_Open();
|
|
|
|
|
|
|
|
int
|
|
|
|
MCP_Close(int handle);
|
|
|
|
|
|
|
|
int
|
|
|
|
MCP_InstallSetTargetDevice(int handle, MCPInstallTarget device);
|
|
|
|
|
|
|
|
int
|
|
|
|
MCP_InstallGetTargetDevice(int handle, MCPInstallTarget *deviceOut);
|
|
|
|
|
|
|
|
int
|
|
|
|
MCP_InstallSetTargetUsb(int handle, int usb);
|
|
|
|
|
|
|
|
int
|
|
|
|
MCP_InstallGetInfo(int handle, char *path, MCPInstallInfo *out);
|
|
|
|
|
|
|
|
int
|
|
|
|
MCP_InstallTitleAsync(int handle, char *path, MCPInstallTitleInfo *out);
|
|
|
|
|
|
|
|
int
|
|
|
|
MCP_InstallGetProgress(int handle, MCPInstallProgress *installProgressOut);
|
|
|
|
|
|
|
|
int
|
|
|
|
MCP_InstallTitleAbort(int handle);
|
|
|
|
|
|
|
|
int
|
|
|
|
MCP_UninstallTitleAsync(int handle, char *path, MCPInstallTitleInfo *out);
|
|
|
|
|
2016-08-07 07:03:30 +02:00
|
|
|
int
|
|
|
|
MCP_DeviceList(int handle, int *numDevices, MCPDeviceList *outDevices, uint32_t outBufferSize);
|
|
|
|
|
|
|
|
int
|
|
|
|
MCP_FullDeviceList(int handle, int *numDevices, MCPDeviceList *outDevices, uint32_t outBufferSize);
|
|
|
|
|
2016-08-02 00:16:36 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/** @} */
|