NJB_Get_Datafile_Tag3
List the data files stored on the njb.
Usage
#include <libnjb.h>
extern int njb_error
void NJB_Reset_Get_Datafile_Tag (njb_t *njb)
datafile_t *NJB_Get_Datafile_Tag (njb_t *njb)
Library
libnjb
Overview
This function is used to obtain a list of data files stored on the NJB. Each call to NJB_Get_Datafile_Tag returns a datafile_t object that contains the datafile tag. It is the program's responsibility to free this memory using the datafile_destroy(3) function when the tag is no longer needed. Tags are returned one at a time, in no particular order. NJB_Reset_Get_Datafile_Tag resets the fetch list to the beginning.
When all the data file tags have been returned, a NULL pointer is returned and njb_error is set to EO_NOMEM.
Return values
NJB_Get_Datafile_Tag returns a datafile_t object on success. If an error occurs, a NULL pointer is returned and njb_error is set accordingly.
EO_BADDATA
|
An invalid datafile tag was received. |
|---|---|
EO_BADSTATUS
|
The NJB returned a non-zero status. |
EO_EOM
|
No more data file tags remain. |
EO_NOMEM
|
There was not enough memory available to create the datafile_t object. |
EO_RDSHORT
|
Fewer bytes than expected were sent by the NJB on the bulk data pipe. |
EO_USBBLK
|
An I/O error occurred on the bulk data pipe. |
EO_USBCTL
|
An I/O error occurred on the control pipe. |
Releases
Unchanged in 2 releases since Debian 3.1 (Sarge).