pspumd.h

Go to the documentation of this file.
00001 /*
00002  * PSP Software Development Kit - http://www.pspdev.org
00003  * -----------------------------------------------------------------------
00004  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
00005  *
00006  * pspumd.h - Prototypes for the sceUmd library.
00007  *
00008  * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
00009  * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
00010  * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
00011  *
00012  * $Id: pspumd.h 2448 2008-12-11 21:45:37Z jim $
00013  */
00014 #ifndef __UMD_H__
00015 #define __UMD_H__
00016 
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020 
00023 
00025 typedef struct pspUmdInfo
00026 {
00028         unsigned int size;
00030         unsigned int type;
00031         
00032 } pspUmdInfo;
00033 
00035 enum pspUmdTypes
00036 {
00037         PSP_UMD_TYPE_GAME =             0x10,
00038         PSP_UMD_TYPE_VIDEO =    0x20,
00039         PSP_UMD_TYPE_AUDIO =    0x40
00040 };
00041 
00043 enum pspUmdState
00044 {
00045         PSP_UMD_NOT_PRESENT =   0x01,
00046         PSP_UMD_PRESENT =               0x02,
00047         PSP_UMD_CHANGED =               0x04,
00048         PSP_UMD_INITING =               0x08,
00049         PSP_UMD_INITED =                0x10,
00050         PSP_UMD_READY =                 0x20
00051 };
00052 
00054 enum UmdDriveStat
00055 {
00057         UMD_WAITFORDISC = PSP_UMD_PRESENT,
00059         UMD_WAITFORINIT = PSP_UMD_READY
00060 };
00061 
00063 typedef int (*UmdCallback)(int unknown, int event);
00064 
00070 int sceUmdCheckMedium(void);
00071 
00079 int sceUmdGetDiscInfo(pspUmdInfo *info);
00080 
00104 int sceUmdActivate(int unit, const char *drive);
00105 
00115 int sceUmdDeactivate(int unit, const char *drive);
00116 
00124 int sceUmdWaitDriveStat(int stat);
00125 
00135 int sceUmdWaitDriveStatWithTimer(int stat, unsigned int timeout);
00136 
00146 int sceUmdWaitDriveStatCB(int stat, unsigned int timeout);
00147 
00153 int sceUmdCancelWaitDriveStat(void);
00154 
00160 int sceUmdGetDriveStat(void);
00161 
00167 int sceUmdGetErrorStat(void);
00168 
00185 int sceUmdRegisterUMDCallBack(int cbid);
00186 
00194 int sceUmdUnRegisterUMDCallBack(int cbid);
00195 
00201 int sceUmdReplacePermit(void);
00202 
00208 int sceUmdReplaceProhibit(void);
00209 
00212 #ifdef __cplusplus
00213 }
00214 #endif
00215 
00216 #endif