#include <stdlib.h>
#include <string.h>
#include "libnjb.h"
#include "base.h"
#include "njb_error.h"
#include "defs.h"
#include "protocol3.h"
#include "byteorder.h"
#include "unicode.h"
#include "songid.h"
#define FR_UNI_ALBUM "UNI_ALBUM" |
Unicode Album metadata for NJB1
#define FR_UNI_ARTIST "UNI_ARTIST" |
Unicode Artist metadata for NJB1
#define FR_UNI_FNAME "UNI_FNAME" |
Unicode Filename metadata for NJB1 (not used)
#define FR_UNI_GENRE "UNI_GENRE" |
Unicode Genre metadata for NJB1
#define FR_UNI_TITLE "UNI_TITLE" |
Unicode Title metadata for NJB1
#define UNICODE_ON_NJB1 |
We want to use Unicode also on NJB1
unsigned char* songid_pack | ( | njb_songid_t * | song, | |
u_int32_t * | tagsize | |||
) |
This packs (serialize, marshal) a libnjb song ID into the raw byte structure used by the NJB1.
song | the libnjb song ID to pack | |
tagsize | a pointer to an integer that will hold the size of the resulting NJB1 songid structure |
unsigned char* songid_pack3 | ( | njb_songid_t * | song, | |
u_int32_t * | tagsize | |||
) |
This packs (serialize, marshal) a libnjb song ID into the raw byte structure used by the series 3 devices.
song | the libnjb song ID to pack | |
tagsize | a pointer to an integer that will hold the size of the resulting series 3 songid structure |
int songid_sanity_check | ( | njb_t * | njb, | |
njb_songid_t * | songid | |||
) |
This function checks that a tag has all compulsory elements, i.e.: size, codec and track number
songid | the song ID to be checked for sanity |
njb_songid_t* songid_unpack | ( | void * | data, | |
size_t | nbytes | |||
) |
This takes a raw chunk of memory representing a song ID as used by the NJB1 and convert it into a song ID structure as used by libnjb.
data | the raw bytes from the NJB1 | |
nbytes | the size of the NJB1 byte array |
int __sub_depth |
The current subroutine depth for all of libnjb (global)
int njb_unicode_flag |
A flag for if unicode is used or not (global)