NJB_Replace_Track_Tag3
Replace a track tag on the jukebox
Usage
#include <sys/types.h> #include <libnjb.h>
extern int njb_error
int NJB_Replace_Track_Tag (njb_t *njb, u_int32_t trackid, const char *codec, const char *title, const char *album, const char *genre, const char *artist, u_int32_t length, u_int32_t tracknum, u_int32_t filesize, const char *fname, const char *year, int protected)
Library
libnjb
Overview
This function replaces the tag for track trackid on the NJB. The codec parameter is required, and cannot be NULL, since it tells the NJB what audio format the song track is stored in. The title, album, genre, artist, length , tracknum , filesize , fname, year, and protected parameters are optional, and can be NULL (pointers) or 0 (integers). However, as the NJB organizes tracks by artist, album, title and genre, is is strongly recommended that these parameters be provided.
This function increments the NJB's library counter, provided it has not been incremented previously during the session.
Return values
If the transfer is successful, NJB_Replace_Track_Tag returns 0. Otherwise, -1 is returned and njb_error is set.
- EO_BADCOUNT
-
The library counter on the NJB could not be updated. The tag replacement was successful.
- EO_BADDATA
-
songtagcontains invalid data or is not properly formed.
- EO_BADSTATUS
-
A non-zero status was returned by the NJB during the communcation.
- EO_INVALID
-
A required parameter was NULL.
- EO_NOMEM
-
There was not enough memory to create the "tag" for the audio track.
- EO_RDSHORT
-
The NJB sent fewer bytes than expected on the bulk data pipe.
- EO_TIMEOUT
-
The NJB did not verify that the transfer was complete after several queries. The tag may have still have been replaced successfully.
- EO_USBBLK
-
An I/O error occurred on the bulk data pipe.
- EO_USBCTL
-
An I/O error occurred on the control pipe.
- EO_WRSHORT
-
Fewer bytes than requested were written to the USB pipe.
- EO_XFERERROR
-
The NJB returned a non-zero status when the tag for the track was transferred.
Releases
Unchanged in 2 releases since Debian 3.1 (Sarge).