libnjb: /usr/obj/ports/libnjb-2.2.7/libnjb-2.2.7/src/playlist.c File Reference

libnjb 2.2.7

- Main Page
- Modules
- Data Structures
- Files
- Examples

- File List
- Globals

Functions | Variables
playlist.c File Reference
`#include <stdlib.h>`
`#include <stdio.h>`
`#include <string.h>`
`#include "libnjb.h"`
`#include "njb_error.h"`
`#include "defs.h"`
`#include "base.h"`
`#include "unicode.h"`
`#include "byteorder.h"`
`#include "playlist.h"`

## Functions
njb_playlist_t * | NJB_Playlist_New (void)
njb_playlist_t * | playlist_unpack (void *data, size_t nbytes)
void | NJB_Playlist_Addtrack (njb_playlist_t *pl, njb_playlist_track_t *track, unsigned int pos)
void | NJB_Playlist_Deltrack (njb_playlist_t *pl, unsigned int pos)
void | NJB_Playlist_Deltrack_TrackID (njb_playlist_t *pl, u_int32_t trackid)
void | NJB_Playlist_Destroy (njb_playlist_t *pl)
void | NJB_Playlist_Reset_Gettrack (njb_playlist_t *pl)
njb_playlist_track_t * | NJB_Playlist_Gettrack (njb_playlist_t *pl)
int | NJB_Playlist_Set_Name (njb_playlist_t *pl, const char *name)
njb_playlist_track_t * | NJB_Playlist_Track_New (u_int32_t trackid)
void | NJB_Playlist_Track_Destroy (njb_playlist_track_t *track)

## Variables
int | njb_unicode_flag
int | __sub_depth

## Detailed Description

This file contains the functions dealing with playlists.

## Function Documentation

njb_playlist_t* playlist_unpack | ( | void * | data,
|  | size_t | nbytes
| ) |  |

This function unpacks packed playlist data from the NJB1. Not applicable for other jukeboxes.

Parameters

  data | a chunk of raw data to process
  nbytes | the size of the data chunk

Returns
  a new playlist structure with correct name and all tracks added.

References njb_playlist_struct::_state, njb_playlist_struct::name, njb1_bytes_to_16bit(), njb1_bytes_to_32bit(), NJB_PL_UNCHANGED, NJB_Playlist_Addtrack(), NJB_Playlist_Destroy(), NJB_Playlist_New(), NJB_Playlist_Track_New(), NJB_UC_UTF8, njb_playlist_struct::plid, and strtoutf8().

## Variable Documentation

int __sub_depth

The current subroutine depth for all of libnjb (global)