~ubuntu-branches/debian/wheezy/libnjb/wheezy

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.TH NJB_GET_PLAYLIST 3 "March 2001"
.SH NAME
NJB_Get_Playlist, NJB_Reset_Get_Playlist \- Get playlist definitions from 
the NJB
.SH LIBRARY
libnjb
.SH SYNOPSIS
#include <libnjb.h>

extern int njb_error

void NJB_Reset_Get_Playlist(njb_t
.BR *njb )

playlist_t *NJB_Get_Playlist(njb_t
.BR *njb )

.SH DESCRIPTION
This function is used to fetch a playlist definition from the NJB.  The
playlists are returned in no particular order, with each
NJB_Get_Playlist query returning a single playlist.  The calling
program should invoke NJB_Reset_Get_Playlist before making calls to
NJB_Get_Playlist, to ensure that all playlists are returned.

Each call to NJB_Get_Playlist returns a playlist_t object, which lists all
the songs in the playlist.  It is the program's responsibility to free
this memory when the playlist is no longer needed, using the
.BR playlist_destroy (3)
function.

When all playlists have been fetched, NJB_Get_Playlist returns a NULL
pointer, and sets 
.B njb_error
to EO_NOMEM.

.SH RETURN VALUES
A playlist_t object is returned from a successful query.  If no more 
playlists remain, or an error is encountered, a NULL pointer is returned and
.B njb_error
is set as follows:
.LP
.TP 10
EO_BADDATA
An invalid playlist was returned.
.TP 10
EO_BADSTATUS
A non-zero status was encountered when attempting to get a tag.
.TP 10
EO_EOM
No more playlists remain on the NJB.
.TP 10
EO_NOMEM
There was not enough memory available to create the playlist_t object.
.TP 10
EO_RDSHORT
The NJB returned fewer bytes than expected on the bulk data pipe.
.TP 10
EO_USBBLK
An I/O error occurred on the bulk data pipe.
.TP 10
EO_USBCTL
An I/O error occurred on the control pipe.
.SH SEE ALSO
playlist_destroy(3)