Functions | |
int | NJB_Discover (njb_t *njbs, int limit, int *n) |
int | NJB_Open (njb_t *njb) |
void | NJB_Close (njb_t *njb) |
int | NJB_Capture (njb_t *njb) |
int | NJB_Release (njb_t *njb) |
void | NJB_Ping (njb_t *njb) |
int | NJB_Get_Disk_Usage (njb_t *njb, u_int64_t *btotal, u_int64_t *bfree) |
char * | NJB_Get_Owner_String (njb_t *njb) |
int | NJB_Set_Owner_String (njb_t *njb, const char *name) |
int | NJB_Get_Bitmap_Dimensions (njb_t *njb, int *x, int *y, int *bytes) |
int | NJB_Set_Bitmap (njb_t *njb, const unsigned char *bitmap) |
njb_keyval_t * | NJB_Get_Keys (njb_t *njb) |
u_int64_t | NJB_Get_NJB1_Libcounter (njb_t *njb) |
int | NJB_Send_Firmware (njb_t *njb, const char *path, NJB_Xfer_Callback *callback, void *data) |
int | NJB_Get_Battery_Level (njb_t *njb) |
int | NJB_Get_Battery_Charging (njb_t *njb) |
int | NJB_Get_Auxpower (njb_t *njb) |
int | NJB_Get_SDMI_ID (njb_t *njb, u_int8_t *sdmiid) |
const char * | NJB_Get_Device_Name (njb_t *njb, int type) |
int | NJB_Get_Firmware_Revision (njb_t *njb, u_int8_t *major, u_int8_t *minor, u_int8_t *release) |
int | NJB_Get_Hardware_Revision (njb_t *njb, u_int8_t *major, u_int8_t *minor, u_int8_t *release) |
int | NJB_Set_Turbo_Mode (njb_t *njb, u_int8_t mode) |
|
This captures a device for usage after opening.
|
|
This closes a previously opened and used NJB object.
|
|
This scans the USB buses for available devices, i.e. jukeboxes.
|
|
This function determines if we are on auxiliary power (charger connected) or not. (It will also signify if the USB power is connected on devices that support it.) One most typical use of this function is to determine the status before any firmware upgrade commence.
|
|
This function determines if we are charging the battery or not.
|
|
This function returns the current battery level between 0 and 100. The hardware will typically prevent the device from working properly if the battery level is too low, so figures above 50 are the most common.
|
|
EXPERIMENTAL: This function returns the dimensions for the bitmap image on the device, in case the bitmap can be set. Returns -1 if the device does not support setting the bitmap. Currently this command only supports sending bitmap to the NJB2, other models are unsupported, so this needs some development.
|
|
This function returns the name of the jukebox device as a string.
char *name; name = NJB_Get_Device_Name(njb, 0); if (name != NULL) { printf("Device name: %s\n", name); }
|
|
This retrieves the amount of currently used disk space in bytes.
|
|
This function returns the firmware revision for a certain jukebox device. The
|
|
This function returns the hardware revision for a certain jukebox device. This information is hardcoded to "1.0.0" for the NJB1 since that device does not support retrieving the hardware revision.
|
|
On series 3 devices, this command retrieves some key/value pairs that are believed to be used for DRM schemes. We have no idea of how to use these, just that they make possible to do proper signing of protected WMA files before transfer.
|
|
This retrieves the library counter for the Nomad Jukebox 1 (D.A.P., the original). The library counter can be used to validate a track cache for this device, but not for any other devices. If you have a cache with all tracks, datafiles and playlists (in some self-defined format) you can store it along with this number when your program exits. When you restart your program you can check if the numbers are still the same, and if they are, you can keep using your old track/file/playlist cache and need not re-read that information. Note that you have to take action to make sure that you do not accidentally lock out series 3 devices! If this function returns zero, always re-read the entire library.
|
|
This retrieves the owner string for the device, a string representing the owners name.
|
|
This function returns the unique SDMI ID of 16 bytes for a jukebox device. Example:
u_int8_t sdmiid[16]; int result; result = NJB_Get_SDMI_ID(njb, &sdmiid);
|
|
This opens a device for use. This routine will initialize the USB endpoints and interfaces, and allocate an error stack so that error reporting routines can be used after this call.
|
|
This sends a ping ("are you there?") command to the device.
|
|
This releases a captured NJB object after use.
|
|
EXPERIMENTAL: This function sends a new firmware to the device. DO NOT TRY OR USE THIS FUNCTION UNLESS YOU ARE 100 PERCENT SURE OF WHAT YOU ARE DOING, IT IS VITALLY DANGEROUS TO YOUR DEVICE AND MAY RENDER IT COMPLETELY USELESS IF USED WITH INVALID DATA.
|
|
EXPERIMENTAL: This sets the bitmap (boot-up logo) on the device. It is currently experimental and not all devices support changing the bitmap.
|
|
This sets the owner string for the device, a string representing the owner.
|
|
This function sets the turbo mode to on or off. The default value if the function is not calles is that turbo is ON. We have found that a few (very few) devices will react badly on turbo mode, resulting in bad transfers. This setting is only applicable on the series 3 devices, it will have no effect on the NJB1. (Command available as of libnjb 2.2.4.)
|