Constants
| [Menu] |
|
Description The constants shown below indicate the handle status.
|
| [Menu] |
|
Description The following constants are used as reference for moving the access pointer. They are specified as arguments of the ADXF_Seek function.
|
Process Macros
| [Menu] |
|
Format int ADXF_CALC_PTINFO_SIZE(n); Input n: number of inside file in AFS file Output None. Return Value Partition information size (unit : byte) Description Calculates partition information size. This macro is used for the following functions. |
| [Menu] |
|
Format int ADXF_CALC_PTINFO_FMGL_SIZE(n); Input n: number of inside file in AFS file Output None. Return Value Partition information size (unit : byte) Description Calculates partition information size. This macro is used for the following functions. |
Data Types
| [Menu] |
|
Description Stores information about file access for each file. Generated by the functions ADXF_Open and ADXF_OpenAfs. These data are referenced in almost every file access. |
Functions
| [Menu] |
| [Menu] |
|
Format void ADXF_Finish(void); Input None. Output None. Return Value None. Description Performs shutdown processing for the library. Remarks Since this is called by the ADXT_Finish function (ADX playback library shutdown), it normally needs not be called by an application. |
| [Menu] |
|
Format Sint32 ADXF_GetPtinfoSize(Sint32 ptid); Input ptid:partition ID Output None. Return Value Partition information size (unit: bytes) Description Gets the size of the set partition information. |
| [Menu] |
|
Format Sint32 ADXF_LoadPartitionNw(Sint32 ptid, const Char8 *fname, void *dir, void *ptinfo); Input ptid:partition ID (0 - 255) fname:AFS file name dir :Directory information Output ptinfo:partition information read-in area Return Value Error code Description Requests to read partition information of AFS file. And sets the partition ID. After you called this function, you have to check status by ADXF_GetPtStat function and wait for partition load to complete. You can use the partition if partition load will complete. Inside file is managed 2 byte per file. The size of 'ptinfo' is calculated by ADXF_CALC_PTINFO_SIZE(). Example
|
| [Menu] |
|
Format Sint32 ADXF_LoadPartitionRangeNw(Sint32 ptid, const Char8 *fname, void *dir, Sint32 offset_sct, Sint32 range_sct, void *ptinfo); Input ptid:partition ID (0 - 255) fname:AFS file name dir :Directory information offset_sct:offset[sector] range_sct:size[sector] Output ptinfo:partition information read-in area Return Value Error code Description Requests to read partition information of AFS file by specified the range. And sets the partition ID. After you called this function, you have to check status by ADXF_GetPtStat function and wait for partition load to complete. You can use the partition if partition load will complete. Inside file is managed 2 byte per file. The size of 'ptinfo' is calculated by ADXF_CALC_PTINFO_SIZE(). Example
|
| [Menu] |
|
Format Sint32 ADXF_LoadPartitionFromAfsNw(Sint32 set_ptid, Sint32 rd_ptid, Sint32 rd_flid, void *ptinfo); Input set_ptid:partition ID for loading and setting(0 - 255) rd_ptid:partition ID reading AFS file rd_flid:file ID reading AFS file Output ptinfo:partition information read-in area Return Value Error code Description Requests to read partition information of AFS file. And sets the partition ID. After you called this function, you have to check status by ADXF_GetPtStat function and wait for partition load to complete. You can use the partition if partition load will complete. Inside file is managed 2 byte per file. The size of 'ptinfo' is calculated by ADXF_CALC_PTINFO_SIZE(). Remarks This function is used when the partition information of AFS file in AFS file is read. AFS file specified by rd_ptid and rd_flid can be used by the partition of set_ptid. An inside file can be opened by ADXF_OpenAfs(). Example
|
| [Menu] |
|
Format Sint32 ADXF_LoadPartitionFmgLongNw(Sint32 ptid, const Char8 *fname, void *dir, void *ptinfo); Input ptid:partition ID (0 - 255) fname:AFS file name dir :Directory information Output ptinfo:partition information read-in area Return Value Error code Description Requests to read partition information of AFS file. And sets the partition ID. After you called this function, you have to check status by ADXF_GetPtStat function and wait for partition load to complete. You can use the partition if partition load will complete. Inside file is managed 4 byte per file. The size of 'ptinfo' is calculated by ADXF_CALC_PTINFO_FMGL_SIZE(). Remarks 128 Mbytes or more of inside file is treated by this function. Example
|
| [Menu] |
|
Format Sint32 ADXF_LoadPartitionFromAfsFmgLongNw(Sint32 set_ptid, Sint32 rd_ptid, Sint32 rd_flid, void *ptinfo); Input set_ptid:partition ID for loading and setting(0 - 255) rd_ptid:partition ID reading AFS file rd_flid:file ID reading AFS file Output ptinfo:partition information read-in area Return Value Error code Description Requests to read partition information of AFS file. And sets the partition ID. After you called this function, you have to check status by ADXF_GetPtStat function and wait for partition load to complete. You can use the partition if partition load will complete. Inside file is managed 4 byte per file. The size of 'ptinfo' is calculated by ADXF_CALC_PTINFO_FMGL_SIZE(). Remarks This function is used when the partition information of AFS file in AFS file is read. AFS file specified by rd_ptid and rd_flid can be used by the partition of set_ptid. An inside file can be opened by ADXF_OpenAfs(). 128 Mbytes or more of inside file is treated by this function. |
| [Menu] |
|
Format Sint32 ADXF_GetPtStat(Sint32 ptid); Input ptid:partition ID (0 - 255) Output None. Return Value partition loading status (status: ADXF_STAT_ - )
Description Gets the partition loading status. By this function you have to check status after you called ADXF_LoadPartitionNw function and wait for partition load to complete. You can use the partition if partition load will complete. |
| [Menu] |
|
Format void ADXF_StopPtLd(void); Input None. Output None. Return Value None. Description Stops to load partition information. If you break partition load, you cannot use the partition information. |
| [Menu] |
|
Format ADXF ADXF_Open(const Char8 *fname, void *atr); Input fname:file name atr :file attribute Output None. Return Value ADXF handle, NULL in case of error Description Opens the specified file and returns the ADXF handle. Remarks This function is the blocking function. Process is blocked in the function until the specified file is opened. To avoid the block of the process, you should use the file information cache or the ADXF_OpenNw function. |
| [Menu] |
|
Format ADXF ADXF_OpenNw(const Char8 *fname, void *atr); Input fname:file name atr :file attribute Output None. Return Value ADXF handle, NULL in case of error Description Creates the ADXF handle, and begins the file open. Remarks This function is the non-blocking function. Process is not blocked in this function. This function returns the ADXF handle, even if the file open failed. If the file open failed, the ADXF handle's status becomes ADXF_STAT_ERROR. Note Following functions block the process, when called before the file open has been completed. - ADXF_GetFsizeByte64 To avoid the block of the process, you should check whether the file has been opened, using the ADXF_IsOpened function. Example
|
| [Menu] |
|
Format ADXF ADXF_OpenRange(const Char8 *fname, void *atr, Sint32 offset_sct, Sint32 range_sct) Input fname:file name atr :file attribute offset_sct:offset[sector] range_sct:size[sector] Output None. Return Value ADXF handle, NULL in case of error Description Opens the specify file name and the range as a sector. |
| [Menu] |
|
Format ADXF ADXF_OpenAfs(Sint32 ptid, Sint32 flid); Input ptid:partition ID flid:file ID Output None. Return Value ADXF handle, NULL in case of error Description Opens AFS file specified by partition ID and file ID, and returns ADXF handle. Remarks This function is the blocking function. Process is blocked in the function until the specified file is opened. To avoid the block of the process, you should use the file information cache or the ADXF_OpenAfsNw function. |
| [Menu] |
|
Format ADXF ADXF_OpenAfsNw(Sint32 ptid, Sint32 flid); Input ptid:partition ID flid:file ID Output None. Return Value ADXF handle, NULL in case of error Description Creates the ADXF handle, and begins the AFS file open. Remarks This function is the non-blocking function. Process is not blocked in this function. This function returns the ADXF handle, even if the file open failed. If the file open failed, the ADXF handle's status becomes ADXF_STAT_ERROR. Note Following functions block the process, when called before the file open has been completed. - ADXF_GetFsizeByte64 To avoid the block of the process, you should check whether the file has been opened, using the ADXF_IsOpened function. Example
|
| [Menu] |
|
Format Bool ADXF_IsOpened(ADXF adxf); Input adxf :ADXF handle Output None. Return Value TRUE=the file has been opened, FALSE=the file has not been opened yet Description Checks whether the file has been opened. |
| [Menu] |
|
Format void ADXF_Close(ADXF adxf); Input adxf :ADXF handle Output None. Return Value None. Description Closes the specified ADXF handle. |
| [Menu] |
|
Format Sint32 ADXF_ReadNw(ADXF adxf, Sint32 nsct, void *buf); Input adxf:ADXF handle nsct:read data volume (unit: sectors) buf :read-in area Output None. Return Value Read request size (unit: sectors) Description Issues data read request. When requested access is completed, the access pointer advances to the sector specified by nsct. Remarks The user has to notice because the buf address boundary is different in each platform. When the specified number of read sectors extends beyond the file end, the number of sectors to the file end is returned, and file read is performed to the file end. Note The returned value of the ADXF_ReadNw function is only 'request' size. Actual read size might not be same. If you need actual read size, you should call the ADXF_GetNumReadSct function, after reading process has been completed. In the following cases, request size will not be same as actual read size. - The file pointer has reached the end of file. - The reading error has occurred. - The reading process has been stopped by the ADXF_Stop function. |
| [Menu] |
| [Menu] |
|
Format Sint32 ADXF_StopNw(ADXF adxf); Input adxf :ADXF handle Output None. Return Value Access pointer at request to stop Description Requests to stop the data loading process. |
| [Menu] |
|
Format void ADXF_ExecServer(void); Input None. Output None. Return Value None. Description Updates the internal state. Remarks Applications do not need to call this function, because it is called automatically by the Vsync interrupt. |
| [Menu] |
|
Format Sint32 ADXF_Seek(ADXF adxf, Sint32 pos, Sint32 type); Input adxf :ADXF handle pos:access pointer move amount (unit: sectors) type:move reference (seek type: ADXF_SEEK_ - )
Output None. Return Value Access pointer position Description Moves the access pointer to a position at "pos" sectors from "type". When a move beyond the end of the file is specified, the access pointer moves to the end of the file. Note This function stops the current reading process. If ADXF handle's status is ADXF_STAT_READING, it becomes to ADXF_STAT_STOP. |
| [Menu] |
| [Menu] |
|
Format Sint32 ADXF_GetFsizeSct(ADXF adxf); Input adxf:ADXF handle Output None. Return Value File size (unit: sectors) Description Gets the size of the specified file. |
| [Menu] |
|
Format Sint32 ADXF_GetFsizeByte(ADXF adxf); Input adxf:ADXF handle Output None. Return Value File size (unit: byte) Description Gets the size of the specified file. |
| [Menu] |
|
Format Sint32 ADXF_GetNumReqSct(ADXF adxf, Sint32 *seekpos); Input adxf:ADXF handle Output seekpos:read position Return Value Requested read data volume (unit: sectors) Description Gets the read position and data volume requested by the ADXF_ReadNw function. |
| [Menu] |
|
Format Sint32 ADXF_GetNumReadSct(ADXF adxf); Input adxf:ADXF handle Output None. Return Value Read data volume (unit: sectors) Description Gets the actually read amount of data. |
| [Menu] |
|
Format Sint32 ADXF_GetStat(ADXF adxf); Input adxf:ADXF handle Output None. Return Value ADXF handle internal status (status: ADXF_STAT_ - )
Description Gets the internal status of the ADXF handle. |
| [Menu] |
|
Format Sint32 ADXF_GetStatRead(ADXF adxf); Input adxf:ADXF handle Output None. Return Value 1=data read is in progress, 0=data read is stopped Description Gets current status of data read. |
| [Menu] |
|
Format Sint32 ADXF_GetFileSize(const Char8 *fname); Input fname:file name Output None. Return Value File size (unit: bytes) Description Gets the size of the specified file. |
| [Menu] |
|
Format Bool ADXF_IsExistFile(const Char8 *fname); Input fname:file name Output None Return Value TRUE=file exist, FALSE=otherwise Description Checks whether file exist. Remarks This function does not return error callback even if file does not exist. |
| [Menu] |
|
Format void ADXF_SetupRofs(void *sprmr); Input sprmr: ROFS setup parameter structure Output None. Return Value None. Description Sets up the ROFS. |
| [Menu] |
|
Format void ADXF_ShutdownRofs(void); Input None. Output None. Return Value None. Description Shuts down the ROFS. |
| [Menu] |
|
Format Sint32 ADXF_AddRofsVol(Char8 *volname, Char8 *imgname); Input volname: volume name imgname: image file name Output None. Return Value Error code Description Adds the specified image file as volume. You have to add device name to parameter "imgname" |
| [Menu] |
|
Format void ADXF_DelRofsVol(Char8 *volname); Input volname: volume name Output None. Return Value None. Description Deletes the specified volume. |
| [Menu] |
|
Format void ADXF_SetDefDev(Char8 *devname); Input devname: device name Output None. Return Value None. Description Sets the specified device to default device. |