#include "config.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include "libnjb.h"
#include "protocol.h"
#include "byteorder.h"
#include "njb_error.h"
#include "usb_io.h"
#include "ioutil.h"
#include "defs.h"
#include "base.h"
#include "eax.h"
#include "songid.h"
#include "datafile.h"
#include "njbtime.h"
#include "playlist.h"
Defines | |
#define | NJB_STATUS(a, b) |
Functions | |
int | njb_init_state (njb_t *njb) |
int | njb_set_library_counter (njb_t *njb, u_int64_t count) |
int | njb_get_library_counter (njb_t *njb, njblibctr_t *lcount) |
int | njb_ping (njb_t *njb) |
int | njb_verify_last_command (njb_t *njb) |
int | njb_capture (njb_t *njb, int which) |
int | njb_get_track_tag_header (njb_t *njb, njbttaghdr_t *tagh, int cmd) |
njb_songid_t * | njb_get_track_tag (njb_t *njb, njbttaghdr_t *tagh) |
int | njb_get_playlist_header (njb_t *njb, njbplhdr_t *plh, int cmd) |
njb_playlist_t * | njb_get_playlist (njb_t *njb, njbplhdr_t *plh) |
int | njb_get_disk_usage (njb_t *njb, u_int64_t *total, u_int64_t *free_bytes) |
int | njb_get_owner_string (njb_t *njb, owner_string name) |
int | njb_set_owner_string (njb_t *njb, owner_string name) |
int | njb_get_datafile_header (njb_t *njb, njbdfhdr_t *dfh, int cmd) |
njb_datafile_t * | njb_get_datafile_tag (njb_t *njb, njbdfhdr_t *dfh) |
u_int32_t | njb_receive_file_block (njb_t *njb, u_int32_t offset, u_int32_t bsize, void *bp) |
int | njb_request_file (njb_t *njb, u_int32_t fileid) |
int | njb_transfer_complete (njb_t *njb) |
int | njb_send_track_tag (njb_t *njb, njbttaghdr_t *tagh, void *tag) |
int | njb_send_datafile_tag (njb_t *njb, njbdfhdr_t *dfh, void *tag) |
u_int32_t | njb_send_file_block (njb_t *njb, void *data, u_int32_t blocksize) |
int | njb_stop_play (njb_t *njb) |
int | njb_get_eax_size (njb_t *njb, u_int32_t *size) |
void | njb_read_eaxtypes (njb_t *njb, u_int32_t size) |
njb_eax_t * | njb_get_nexteax (njb_t *njb) |
njb_time_t * | njb_get_time (njb_t *njb) |
int | njb_set_time (njb_t *njb, njb_time_t *time) |
int | njb_create_playlist (njb_t *njb, char *name, u_int32_t *plid) |
int | njb_delete_playlist (njb_t *njb, u_int32_t plid) |
int | njb_rename_playlist (njb_t *njb, u_int32_t plid, char *name) |
int | njb_add_track_to_playlist (njb_t *njb, u_int32_t plid, u_int32_t trid) |
int | njb_add_multiple_tracks_to_playlist (njb_t *njb, u_int32_t plid, u_int32_t *trids, u_int16_t ntracks) |
int | njb_delete_track (njb_t *njb, u_int32_t trackid) |
int | njb_delete_datafile (njb_t *njb, u_int32_t fileid) |
int | njb_play_or_queue (njb_t *njb, u_int32_t trackid, int cmd) |
int | njb_elapsed_time (njb_t *njb, u_int16_t *elapsed, int *change) |
int | njb_replace_track_tag (njb_t *njb, njbttaghdr_t *tagh, void *tag) |
int | njb_adjust_sound (njb_t *njb, u_int8_t effect, int16_t value) |
Variables | |
int | __sub_depth |
|
Value: { \
char *s = njb_status_string(b);\
njb_error_add_string(a,subroutinename,s);\
free (s); \
}
|
|
This function captures the NJB1 device.
|
|
Retrieves a datafile header from the NJB1
|
|
Get disk usage for the NJB1
|
|
This function gets the library counter from the device. The library counter is sent back and forth to the device to indicate if something in the library as changed.
|
|
This retrieves an EAX effect from the list of effects read in by the previous functions.
|
|
Gets a playlist header.
|
|
Get a track header from the NJB1.
|
|
Initializes the basic state of the njb->protocol_state for the NJB1-device.
|
|
This function pings the NJB1 device to see if it is up and running, and ready for action. This is done every now and then.
|
|
This reads in the block with EAX types. It is a byte chunk which is then interpreted and the EAX effects are added to a list of effects which is then retrieved by calls to the
|
|
offset is the offset into the file, starting at 0. bsize indicates the recieved buffer max size. bp points to the recieve buffer (atleast NJB_XFER_BLOCK_SIZE + NJB_XFER_BLOCK_HEADER_SIZE) lastsort indicates if last transfer was short (ended before requested number of bytes were recieved). If lastshort == 1, the last call to this function returned a a short read. In that case, a new setup command shall not be sent, the bus shall just keep retrieveing buffer contents from the bulk pipe. |
|
This function sets the library counter on the device. The library counter is sent back and forth to the device to indicate if something in the library has changed.
|
|
This function verifies if the last command was successful or not.
|
|
The current subroutine depth for all of libnjb (global) |