uofw/include/mediaman_kernel.h
2014-04-25 23:46:48 +01:00

191 lines
5.4 KiB
C

/* Copyright (C) 2011, 2012, 2013, 2014 The uOFW team
See the file COPYING for copying permission.
*/
#include "common_header.h"
#ifndef MEDIAMAN_KERNEL_H
#define MEDIAMAN_KERNEL_H
#ifdef __cplusplus
extern "C" {
#endif
s32 sceUmd_040A7090(s32 errorState);
SceUID sceUmdGetUserEventFlagId(void);
s32 sceUmdGetDriveStatus(void);
s32 sceUmdGetAssignedFlag(void);
void sceUmdSetAssignedFlag(s32 flag);
void sceUmdClearDriveStatus(s32 state);
void sceUmdSetDriveStatus(s32 state);
u32 sceUmdSetErrorStatus(s32 state);
s32 sceUmdGetErrorStatus(void);
u32 sceUmdRegisterGetUMDInfoCallBack(s32 (*umdInfoCallback)(SceUmdDiscInfo *), SceUmdDiscInfo *pDiscInfo);
u32 sceUmdUnRegisterGetUMDInfoCallBack(void);
u32 sceUmd_63517CBA(s32 (*arg0)(void *), void *arg1);
u32 sceUmd_1471F63D(void);
void sceUmdUnRegisterActivateCallBack(void);
void sceUmdUnRegisterDeactivateCallBack(void);
u32 sceUmdRegisterActivateCallBack(s32 (*activateCallback)(s32, void *), void *param);
u32 sceUmdRegisterDeactivateCallBack(s32 (*deactivateCallback)(s32, void *), void *param);
u32 sceUmdRegisterReplaceCallBack(s32 (*umdReplaceCallback)(s32));
u32 sceUmdUnRegisterReplaceCallBack(void);
u32 sceUmd_76D356F9(s32 (*arg0)(void));
/**
* Activate the media mananger driver.
*
* @param mode The initial UMD device power mode. One of ::SceUmdDevicePowerModes.
* @param aliasName The alias name for the mounted filesystem device name.
*
* @return SCE_ERROR_OK on success, otherwise SCE_ERROR_ERRNO_INVALID_ARGUMENT.
*/
s32 sceUmdActivate(s32 mode, const char *aliasName);
/**
* Deactivate the media manager driver.
*
* @param mode The new UMD device power mode? One of ::SceUmdDevicePowerModes
* @param aliasName aliasName The alias name for the mounted filesystem device name.
*
* @return SCE_ERROR_OK on success, otherwise SCE_ERROR_ERRNO_INVALID_ARGUMENT.
*/
s32 sceUmdDeactivate(s32 mode, const char *aliasName);
/**
* Get the disc information
*
* @param pDiscInfo Pointer to a SceUmdDiscInfo structure to retrieve the disc information.
*
* @return SCE_ERROR_OK on success, otherwise SCE_ERROR_ERRNO_INVALID_ARGUMENT on invalid arguments;
* SCE_ERROR_UMD_NO_MEDIUM if there is no UMD medium inserted.
*/
s32 sceUmdGetDiscInfo(SceUmdDiscInfo *pDiscInfo);
/**
* Register a callback that is called when the UMD disc state changes. Only exactly one callback can be
* registered at any given time.
*
* @param callbackId The ID of the callback.
*
* @return SCE_ERROR_OK on success, otherwise SCE_ERROR_ERRNO_INVALID_ARGUMENT (when the passed ID does
* not belong to a callback).
*/
s32 sceUmdRegisterUMDCallBack(SceUID callbackId);
/**
* Unregister a callback that is called when the UMD disc state changes.
*
* @param callbackId The ID of the callback.
*
* @return SCE_ERROR_OK on success, otherwise SCE_ERROR_ERRNO_INVALID_ARGUMENT (when the passed ID does
* not match the ID of the previously registered callback).
*/
s32 sceUmdUnRegisterUMDCallBack(SceUID callbackId);
/**
* Verify the existence of an UMD medium.
*
* @return 0, if no disc is present, a value != 0 indicates disc is present.
*/
s32 sceUmdCheckMedium(void);
/**
* Wait for a UMD drive status event.
*
* @param umdState The state to wait for until it occurs. One of ::SceUmdDiscStates.
*
* @return SCE_ERROR_OK, otherwise SCE_ERROR_ERRNO_INVALID_ARGUMENT if the given umd state
* isn't one of the following: SCE_UMD_MEDIA_OUT, SCE_UMD_MEDIA_IN, SCE_UMD_NOT_READY,
* SCE_UMD_READY, SCE_UMD_READABLE
* Other errors indicate a thread synchronization error.
*/
s32 sceUmdWaitDriveStat(s32 umdState);
/**
* Wait for a UMD drive status event.
*
* @param umdState The state to wait for until it occurs. One of ::SceUmdDiscStates.
* @param timeout Timeout value in microseconds for the wait.
*
* @return SCE_ERROR_OK, otherwise SCE_ERROR_ERRNO_INVALID_ARGUMENT if the given umd state
* isn't one of the following: SCE_UMD_MEDIA_OUT, SCE_UMD_MEDIA_IN, SCE_UMD_NOT_READY,
* SCE_UMD_READY, SCE_UMD_READABLE.
* Other errors indicate a thread synchronization error.
*/
s32 sceUmdWaitDriveStatWithTimer(u32 umdState, u32 timeout);
/**
* Wait for a UMD drive status event with callback.
*
* @param umdState The state to wait for until it occurs. One of ::SceUmdDiscStates.
* @param timeout Timeout value in microseconds for the wait.
*
* @return SCE_ERROR_OK, otherwise SCE_ERROR_ERRNO_INVALID_ARGUMENT if the given umd state
* isn't one of the following: SCE_UMD_MEDIA_OUT, SCE_UMD_MEDIA_IN, SCE_UMD_NOT_READY,
* SCE_UMD_READY, SCE_UMD_READABLE
* Other errors indicate a thread synchronization error.
*/
s32 sceUmdWaitDriveStatCB(u32 umdState, u32 timeout);
/**
* Cancel a wait for a UMD drive status event.
*
* @return SCE_ERROR_OK on success, otherwise less than 0.
*/
s32 sceUmdCancelWaitDriveStat(void);
/**
* Prohibit UMD disc being replaced.
*
* @return SCE_ERROR_OK on success, otherwise less than 0.
*/
s32 sceUmdReplaceProhibit(void);
/**
* Permit UMD disc being replaced.
*
* @return SCE_ERROR_OK on success, otherwise less than 0.
*/
s32 sceUmdReplacePermit(void);
/**
* Unknown.
*
* @return SCE_ERROR_OK on success, otherwise less than 0.
*/
s32 sceUmdUseUMDInMsUsbWlan(void);
/**
* Unknown.
*
* @return SCE_ERROR_OK on success, otherwise less than 0.
*/
s32 sceUmdUnuseUMDInMsUsbWlan(void);
#ifdef __cplusplus
}
#endif
#endif /* MEDIAMAN_KERNEL_H */