libnjb 2.2.7

libnjb.h
Go to the documentation of this file.
1
13 #ifndef __LIBNJB__H
14 #define __LIBNJB__H
15
17 #define LIBNJB_VERSION 2.2.7
18
19 #define LIBNJB_COMPILED_FOR_LIBUSB 1
20
21 /* This handles MSVC pecularities */
22 #ifdef _MSC_VER
23 #include <windows.h>
24 #define __WIN32__
25 #define snprintf _snprintf
26 #define ssize_t SSIZE_T
27 #endif
28
29 #include <sys/types.h>
30 #ifdef __WIN32__
31 /* Windows specific code, types that do not exist in Windows
32 * sys/types.h
33 */
34 typedef char int8_t;
35 typedef unsigned char u_int8_t;
36 typedef __int16 int16_t;
37 typedef unsigned __int16 u_int16_t;
38 typedef __int32 int32_t;
39 typedef unsigned __int32 u_int32_t;
40 typedef unsigned __int64 u_int64_t;
41 #endif
42 #ifdef __sun
43
44 /*
45 * Solaris specific code, types that do not exist in Solaris'
46 * sys/types.h. u_intN_t is the ISO C way, whereas Solaris'
47 * way is POSIXly correct.
48 */
49 #define u_int8_t uint8_t
50 #define u_int16_t uint16_t
51 #define u_int32_t uint32_t
52 #define u_int64_t uint64_t
53 #endif
54
55
56 #include <stdio.h>
57 #include <usb.h>
58
60 #define NJB_MAX_DEVICES 0xFF
61
72 #define NJB_DEVICE_NJB1 0x00
73 #define NJB_DEVICE_NJB2 0x01
74 #define NJB_DEVICE_NJB3 0x02
75 #define NJB_DEVICE_NJBZEN 0x03
76 #define NJB_DEVICE_NJBZEN2 0x04
77 #define NJB_DEVICE_NJBZENNX 0x05
78 #define NJB_DEVICE_NJBZENXTRA 0x06
79 #define NJB_DEVICE_DELLDJ 0x07
80 #define NJB_DEVICE_NJBZENTOUCH 0x08
81 #define NJB_DEVICE_NJBZENMICRO 0x09
82 #define NJB_DEVICE_DELLDJ2 0x0a
83 #define NJB_DEVICE_POCKETDJ 0x0b
84 #define NJB_DEVICE_ZENSLEEK 0x0c
85 #define NJB_DEVICE_CREATIVEZEN 0x0d
86 #define NJB_DEVICE_DELLDJ3 0x0e
93 #define NJB_TYPE_STRING 0x00
94 #define NJB_TYPE_UINT16 0x02
95 #define NJB_TYPE_UINT32 0x03
102 #define NJB_CODEC_MP3 "MP3"
103 #define NJB_CODEC_WMA "WMA"
104 #define NJB_CODEC_WAV "WAV"
105 #define NJB_CODEC_AA "AA"
112 #define FR_SIZE "FILE SIZE"
113 #define FR_LENGTH "LENGTH"
114 #define FR_CODEC "CODEC"
115 #define FR_TITLE "TITLE"
116 #define FR_ALBUM "ALBUM"
117 #define FR_GENRE "GENRE"
118 #define FR_ARTIST "ARTIST"
119 #define FR_TRACK "TRACK NUM"
120 #define FR_FNAME "FNAME"
121 #define FR_YEAR "YEAR"
122 #define FR_PROTECTED "PlayOnly"
123 /* These two are used by Notmad on NJB1, not Creative */
124 #define FR_BITRATE "BITRATE"
125 #define FR_COMMENT "COMMENT"
126 /* This one is used on series 3 devices only */
127 #define FR_FOLDER "FOLDER"
135 #define DD_USBCTL 1
136 #define DD_USBBLKLIM 2
137 #define DD_USBBLK 4
138 #define DD_SUBTRACE 8
146 #define NJB_UC_8859 0
147 #define NJB_UC_UTF8 1
155 #define NJB_TURBO_OFF 0
156 #define NJB_TURBO_ON 1
160 #define OWNER_STRING_LENGTH 128
161
162 typedef unsigned char owner_string[OWNER_STRING_LENGTH + 1];
163
168 typedef struct njb_struct njb_t;
169 typedef struct njb_songid_frame_struct njb_songid_frame_t;
170 typedef struct njb_songid_struct njb_songid_t;
171 typedef struct njb_playlist_track_struct njb_playlist_track_t;
172 typedef struct njb_playlist_struct njb_playlist_t;
173 typedef struct njb_datafile_struct njb_datafile_t;
174 typedef struct njb_eax_struct njb_eax_t;
175 typedef struct njb_time_struct njb_time_t;
176 typedef struct njb_keyval_struct njb_keyval_t;
182 struct njb_struct {
183 struct usb_device *device;
184 usb_dev_handle *dev;
185 u_int8_t usb_config;
186 u_int8_t usb_interface;
187 u_int8_t usb_bulk_in_ep;
188 u_int8_t usb_bulk_out_ep;
189 int device_type;
190 int updated;
191 u_int32_t xfersize;
192 void *protocol_state;
193 void *error_stack;
194 };
195
196 /* Song/track tag definitions */
197
202 struct njb_songid_frame_struct {
203 char *label;
204 u_int8_t type;
208 union {
209 char *strval;
210 u_int8_t u_int8_val;
211 u_int16_t u_int16_val;
212 u_int32_t u_int32_val;
213 u_int64_t u_int64_val;
214 } data;
215 njb_songid_frame_t *next;
216 };
217
222 struct njb_songid_struct {
223 u_int32_t trid;
224 u_int16_t nframes;
225 njb_songid_frame_t *first;
226 njb_songid_frame_t *last;
227 njb_songid_frame_t *cur;
228 njb_songid_t *next;
229 };
230
231 /* Playlist definitions */
232
237 struct njb_playlist_track_struct {
238 u_int32_t trackid;
239 struct njb_playlist_track_struct *prev;
240 struct njb_playlist_track_struct *next;
241 };
242
247 struct njb_playlist_struct {
248 char *name;
249 int _state;
250 #define NJB_PL_NEW 0
251 #define NJB_PL_UNCHANGED 1
252 #define NJB_PL_CHNAME 2
253 #define NJB_PL_CHTRACKS 3
254 u_int32_t ntracks;
255 u_int32_t plid;
256 njb_playlist_track_t *first;
257 njb_playlist_track_t *last;
258 njb_playlist_track_t *cur;
259 njb_playlist_t *nextpl;
261 };
262
269 #define NJB_FILEFLAGS_REGULAR_FILE 0x80000000U
270
275 struct njb_datafile_struct {
276 char *filename;
281 char *folder;
288 u_int32_t timestamp;
290 u_int32_t flags;
323 u_int32_t dfid;
325 u_int64_t filesize;
331 njb_datafile_t *nextdf;
333 };
334
335
339 typedef enum {
340 NJB_EAX_NO_CONTROL,
341 NJB_EAX_SLIDER_CONTROL,
342 NJB_EAX_FIXED_OPTION_CONTROL
343 } njb_eax_control_t;
344
345
349 struct njb_eax_struct {
350 u_int16_t number;
351 char *name;
352 u_int8_t exclusive;
360 u_int8_t group;
366 njb_eax_control_t type;
374 int16_t current_value;
379 int16_t min_value;
384 int16_t max_value;
388 char **option_names;
394 njb_eax_t *next;
398 };
399
403 struct njb_time_struct {
404 int16_t year;
405 int16_t month;
406 int16_t day;
407 int16_t weekday;
408 int16_t hours;
409 int16_t minutes;
410 int16_t seconds;
411 };
412
417 struct njb_keyval_struct {
418 char key[5];
419 u_int32_t value1;
420 u_int32_t value2;
421 unsigned char deviceid[16];
422 njb_keyval_t *next;
423 };
424
425 #ifdef __cplusplus
426 extern "C" {
427 #endif
428
429 /* NJB commands */
430
432 typedef int NJB_Xfer_Callback(u_int64_t sent, u_int64_t total,
433 const char* buf, unsigned len, void *data);
434
439 void NJB_Set_Debug (int debug_flags);
440 void NJB_Set_Unicode (int unicode_flag);
441 int NJB_Error_Pending(njb_t *njb);
442 void NJB_Error_Reset_Geterror(njb_t *njb);
443 const char *NJB_Error_Geterror(njb_t *njb);
444 void NJB_Error_Dump(njb_t *njb, FILE *fp);
450 int NJB_Discover(njb_t *njbs, int limit, int *n);
451 int NJB_Open(njb_t *njb);
452 void NJB_Close(njb_t *njb);
453 int NJB_Capture (njb_t *njb);
454 int NJB_Release (njb_t *njb);
455 void NJB_Ping(njb_t *njb);
456 int NJB_Get_Disk_Usage (njb_t *njb, u_int64_t *btotal, u_int64_t *bfree);
457 char *NJB_Get_Owner_String (njb_t *njb);
458 int NJB_Set_Owner_String (njb_t *njb, const char *name);
459 int NJB_Get_Bitmap_Dimensions(njb_t *njb, int *x, int *y, int *bytes);
460 int NJB_Set_Bitmap(njb_t *njb, const unsigned char *bitmap);
461 njb_keyval_t *NJB_Get_Keys(njb_t *njb);
462 u_int64_t NJB_Get_NJB1_Libcounter(njb_t *njb);
463 int NJB_Send_Firmware (njb_t *njb, const char *path, NJB_Xfer_Callback *callback, void *data);
464 int NJB_Get_Battery_Level (njb_t *njb);
465 int NJB_Get_Battery_Charging (njb_t *njb);
466 int NJB_Get_Auxpower (njb_t *njb);
467 int NJB_Get_SDMI_ID(njb_t *njb, u_int8_t *sdmiid);
468 const char *NJB_Get_Device_Name(njb_t *njb, int type);
469 int NJB_Get_Firmware_Revision(njb_t *njb, u_int8_t *major, u_int8_t *minor, u_int8_t *release);
470 int NJB_Get_Hardware_Revision(njb_t *njb, u_int8_t *major, u_int8_t *minor, u_int8_t *release);
471 int NJB_Set_Turbo_Mode(njb_t *njb, u_int8_t mode);
477 njb_songid_t *NJB_Songid_New(void);
478 void NJB_Songid_Destroy(njb_songid_t *song);
479 void NJB_Songid_Addframe(njb_songid_t *song, njb_songid_frame_t *frame);
480 void NJB_Songid_Reset_Getframe(njb_songid_t *song);
481 njb_songid_frame_t *NJB_Songid_Getframe(njb_songid_t *song);
482 njb_songid_frame_t *NJB_Songid_Findframe(njb_songid_t *song, const char *label);
483 njb_songid_frame_t *NJB_Songid_Frame_New_String(const char *label, const char *value);
484 njb_songid_frame_t *NJB_Songid_Frame_New_Uint16(const char *label, u_int16_t value);
485 njb_songid_frame_t *NJB_Songid_Frame_New_Uint32(const char *label, u_int32_t value);
486 /* Good helper functions for creating frames - USE THESE IF YOU CAN */
487 njb_songid_frame_t *NJB_Songid_Frame_New_Codec(const char *value);
488 /* #define NJB_Songid_Frame_New_Codec(a) NJB_Songid_Frame_New_String(FR_CODEC, a) */
489 #define NJB_Songid_Frame_New_Title(a) NJB_Songid_Frame_New_String(FR_TITLE, a)
490 #define NJB_Songid_Frame_New_Album(a) NJB_Songid_Frame_New_String(FR_ALBUM, a)
491 #define NJB_Songid_Frame_New_Genre(a) NJB_Songid_Frame_New_String(FR_GENRE, a)
492 #define NJB_Songid_Frame_New_Artist(a) NJB_Songid_Frame_New_String(FR_ARTIST, a)
493 #define NJB_Songid_Frame_New_Length(a) NJB_Songid_Frame_New_Uint16(FR_LENGTH, a)
494 #define NJB_Songid_Frame_New_Filesize(a) NJB_Songid_Frame_New_Uint32(FR_SIZE, a)
495 #define NJB_Songid_Frame_New_Tracknum(a) NJB_Songid_Frame_New_Uint16(FR_TRACK, a)
496 #define NJB_Songid_Frame_New_Year(a) NJB_Songid_Frame_New_Uint16(FR_YEAR, a)
497 #define NJB_Songid_Frame_New_Filename(a) NJB_Songid_Frame_New_String(FR_FNAME, a)
498 #define NJB_Songid_Frame_New_Protected(a) NJB_Songid_Frame_New_Uint16(FR_PROTECTED, a)
499 /* These two only apply to NJB1 */
500 #define NJB_Songid_Frame_New_Bitrate(a) NJB_Songid_Frame_New_Uint32(FR_BITRATE, a)
501 #define NJB_Songid_Frame_New_Comment(a) NJB_Songid_Frame_New_String(FR_COMMENT, a)
502 /* This one only apply to series 3 devices */
503 #define NJB_Songid_Frame_New_Folder(a) NJB_Songid_Frame_New_String(FR_FOLDER, a)
504 void NJB_Songid_Frame_Destroy (njb_songid_frame_t *frame);
505 void NJB_Get_Extended_Tags (njb_t *njb, int extended);
506 void NJB_Reset_Get_Track_Tag (njb_t *njb);
507 njb_songid_t *NJB_Get_Track_Tag (njb_t *njb);
508 int NJB_Replace_Track_Tag(njb_t *njb, u_int32_t trackid, njb_songid_t *songid);
509 int NJB_Get_Track (njb_t *njb, u_int32_t trackid, u_int32_t size,
510 const char *path, NJB_Xfer_Callback *callback, void *data);
511 int NJB_Get_Track_fd (njb_t *njb, u_int32_t trackid, u_int32_t size,
512 int fd, NJB_Xfer_Callback *callback, void *data);
513 int NJB_Send_Track (njb_t *njb, const char *path, njb_songid_t *songid,
514 NJB_Xfer_Callback *callback, void *data, u_int32_t *trackid);
515 int NJB_Delete_Track (njb_t *njb, u_int32_t trackid);
521 void NJB_Reset_Get_Playlist (njb_t *njb);
522 njb_playlist_t *NJB_Get_Playlist (njb_t *njb);
523 int NJB_Delete_Playlist (njb_t *njb, u_int32_t plid);
524 int NJB_Update_Playlist (njb_t *njb, njb_playlist_t *pl);
525 njb_playlist_t *NJB_Playlist_New(void);
526 void NJB_Playlist_Destroy(njb_playlist_t *pl);
527 void NJB_Playlist_Addtrack(njb_playlist_t *pl, njb_playlist_track_t *track,
528 unsigned int pos);
529 #define NJB_PL_END 0
530 #define NJB_PL_START 1
531 void NJB_Playlist_Reset_Gettrack(njb_playlist_t *pl);
532 njb_playlist_track_t *NJB_Playlist_Gettrack(njb_playlist_t *pl);
533 int NJB_Playlist_Set_Name(njb_playlist_t *pl, const char *name);
534 void NJB_Playlist_Deltrack(njb_playlist_t *pl, unsigned int pos);
535 void NJB_Playlist_Deltrack_TrackID(njb_playlist_t *pl, u_int32_t trackid);
536 njb_playlist_track_t *NJB_Playlist_Track_New(u_int32_t trackid);
537 void NJB_Playlist_Track_Destroy(njb_playlist_track_t *track);
543 void NJB_Reset_Get_Datafile_Tag (njb_t *njb);
544 njb_datafile_t *NJB_Get_Datafile_Tag (njb_t *njb);
545 void NJB_Datafile_Destroy(njb_datafile_t *df);
546 #define NJB_Get_File NJB_Get_Track
547 #define NJB_Get_File_fd NJB_Get_Track_fd
548 int NJB_Send_File (njb_t *njb, const char *path, const char *name, const char *folder,
549 NJB_Xfer_Callback *callback, void *data, u_int32_t *fileid);
550 int NJB_Delete_Datafile (njb_t *njb, u_int32_t fileid);
551 int NJB_Create_Folder (njb_t *njb, const char *name, u_int32_t *folderid);
557 void NJB_Reset_Get_EAX_Type (njb_t *njb);
558 njb_eax_t *NJB_Get_EAX_Type (njb_t *njb);
559 void NJB_Destroy_EAX_Type (njb_eax_t *eax);
560 void NJB_Adjust_EAX (njb_t *njb,
561 u_int16_t eaxid,
562 u_int16_t patchindex,
563 int16_t scalevalue);
569 njb_time_t *NJB_Get_Time(njb_t *njb);
570 int NJB_Set_Time(njb_t *njb, njb_time_t *time);
571 void NJB_Destroy_Time(njb_time_t *time);
577 int NJB_Play_Track (njb_t *njb, u_int32_t trackid);
578 int NJB_Queue_Track (njb_t *njb, u_int32_t trackid);
579 int NJB_Stop_Play (njb_t *njb);
580 int NJB_Pause_Play (njb_t *njb);
581 int NJB_Resume_Play (njb_t *njb);
582 int NJB_Seek_Track (njb_t *njb, u_int32_t position);
583 int NJB_Elapsed_Time (njb_t *njb, u_int16_t *elapsed, int *change);
586 #ifdef __cplusplus
587 }
588 #endif
589
590 #endif
njb_time_struct::minutes
int16_t minutes
Definition: libnjb.h:409
NJB_Seek_Track
int NJB_Seek_Track(njb_t *njb, u_int32_t position)
Definition: procedure.c:2681
NJB_Adjust_EAX
void NJB_Adjust_EAX(njb_t *njb, u_int16_t eaxid, u_int16_t patchindex, int16_t scalevalue)
Definition: procedure.c:2008
NJB_Reset_Get_Datafile_Tag
void NJB_Reset_Get_Datafile_Tag(njb_t *njb)
Definition: procedure.c:811
njb_eax_struct::option_names
char ** option_names
Definition: libnjb.h:388
NJB_Get_Track
int NJB_Get_Track(njb_t *njb, u_int32_t trackid, u_int32_t size, const char *path, NJB_Xfer_Callback *callback, void *data)
Definition: procedure.c:904
NJB_Error_Reset_Geterror
void NJB_Error_Reset_Geterror(njb_t *njb)
Definition: njb_error.c:342
njb_eax_struct::number
u_int16_t number
Definition: libnjb.h:350
OWNER_STRING_LENGTH
#define OWNER_STRING_LENGTH
Definition: libnjb.h:160
njb_time_struct::hours
int16_t hours
Definition: libnjb.h:408
NJB_Delete_Track
int NJB_Delete_Track(njb_t *njb, u_int32_t trackid)
Definition: procedure.c:2415
NJB_Playlist_Destroy
void NJB_Playlist_Destroy(njb_playlist_t *pl)
Definition: playlist.c:323
njb_keyval_struct::next
njb_keyval_t * next
Definition: libnjb.h:422
NJB_Get_Auxpower
int NJB_Get_Auxpower(njb_t *njb)
Definition: procedure.c:3366
NJB_Get_Time
njb_time_t * NJB_Get_Time(njb_t *njb)
Definition: procedure.c:2079
njb_struct::protocol_state
void * protocol_state
Definition: libnjb.h:192
NJB_Get_Battery_Level
int NJB_Get_Battery_Level(njb_t *njb)
Definition: procedure.c:3294
NJB_Set_Turbo_Mode
int NJB_Set_Turbo_Mode(njb_t *njb, u_int8_t mode)
Definition: procedure.c:3580
NJB_Playlist_Set_Name
int NJB_Playlist_Set_Name(njb_playlist_t *pl, const char *name)
Definition: playlist.c:404
njb_songid_struct::trid
u_int32_t trid
Definition: libnjb.h:223
NJB_Open
int NJB_Open(njb_t *njb)
Definition: procedure.c:130
NJB_Set_Debug
void NJB_Set_Debug(int debug_flags)
Definition: procedure.c:2819
NJB_Close
void NJB_Close(njb_t *njb)
Definition: procedure.c:184
NJB_Update_Playlist
int NJB_Update_Playlist(njb_t *njb, njb_playlist_t *pl)
Definition: procedure.c:2206
NJB_Xfer_Callback
int NJB_Xfer_Callback(u_int64_t sent, u_int64_t total, const char *buf, unsigned len, void *data)
Definition: libnjb.h:432
NJB_Set_Bitmap
int NJB_Set_Bitmap(njb_t *njb, const unsigned char *bitmap)
Definition: procedure.c:3099
NJB_Create_Folder
int NJB_Create_Folder(njb_t *njb, const char *name, u_int32_t *folderid)
Definition: procedure.c:1872
NJB_Ping
void NJB_Ping(njb_t *njb)
Definition: procedure.c:3131
njb_songid_frame_struct::u_int64_val
u_int64_t u_int64_val
Definition: libnjb.h:213
njb_time_struct::year
int16_t year
Definition: libnjb.h:404
njb_songid_struct::last
njb_songid_frame_t * last
Definition: libnjb.h:226
NJB_Playlist_New
njb_playlist_t * NJB_Playlist_New(void)
Definition: playlist.c:27
NJB_Get_Extended_Tags
void NJB_Get_Extended_Tags(njb_t *njb, int extended)
Definition: procedure.c:424
njb_eax_struct::next
njb_eax_t * next
Definition: libnjb.h:394
njb_eax_struct::exclusive
u_int8_t exclusive
Definition: libnjb.h:352
njb_struct::error_stack
void * error_stack
Definition: libnjb.h:193
njb_eax_struct::current_value
int16_t current_value
Definition: libnjb.h:374
owner_string
unsigned char owner_string[OWNER_STRING_LENGTH+1]
Definition: libnjb.h:162
njb_songid_frame_struct
Definition: libnjb.h:202
njb_time_struct::month
int16_t month
Definition: libnjb.h:405
njb_songid_frame_struct::u_int16_val
u_int16_t u_int16_val
Definition: libnjb.h:211
njb_keyval_struct::value1
u_int32_t value1
Definition: libnjb.h:419
njb_struct::usb_bulk_in_ep
u_int8_t usb_bulk_in_ep
Definition: libnjb.h:187
NJB_Songid_Getframe
njb_songid_frame_t * NJB_Songid_Getframe(njb_songid_t *song)
Definition: songid.c:720
njb_songid_frame_struct::u_int32_val
u_int32_t u_int32_val
Definition: libnjb.h:212
NJB_Playlist_Gettrack
njb_playlist_track_t * NJB_Playlist_Gettrack(njb_playlist_t *pl)
Definition: playlist.c:377
njb_time_struct::day
int16_t day
Definition: libnjb.h:406
NJB_Error_Pending
int NJB_Error_Pending(njb_t *njb)
Definition: njb_error.c:303
NJB_Songid_New
njb_songid_t * NJB_Songid_New(void)
Definition: songid.c:42
njb_struct::updated
int updated
Definition: libnjb.h:190
njb_time_struct::seconds
int16_t seconds
Definition: libnjb.h:410
NJB_Get_SDMI_ID
int NJB_Get_SDMI_ID(njb_t *njb, u_int8_t *sdmiid)
Definition: procedure.c:3411
NJB_Get_Battery_Charging
int NJB_Get_Battery_Charging(njb_t *njb)
Definition: procedure.c:3328
njb_datafile_struct::flags
u_int32_t flags
Definition: libnjb.h:290
NJB_Send_Track
int NJB_Send_Track(njb_t *njb, const char *path, njb_songid_t *songid, NJB_Xfer_Callback *callback, void *data, u_int32_t *trackid)
Definition: procedure.c:1592
NJB_Elapsed_Time
int NJB_Elapsed_Time(njb_t *njb, u_int16_t *elapsed, int *change)
Definition: procedure.c:2740
NJB_Get_Hardware_Revision
int NJB_Get_Hardware_Revision(njb_t *njb, u_int8_t *major, u_int8_t *minor, u_int8_t *release)
Definition: procedure.c:3542
njb_keyval_struct::value2
u_int32_t value2
Definition: libnjb.h:420
NJB_Songid_Addframe
void NJB_Songid_Addframe(njb_songid_t *song, njb_songid_frame_t *frame)
Definition: songid.c:651
NJB_Datafile_Destroy
void NJB_Datafile_Destroy(njb_datafile_t *df)
Definition: datafile.c:52
njb_eax_control_t
njb_eax_control_t
Definition: libnjb.h:339
NJB_Songid_Frame_Destroy
void NJB_Songid_Frame_Destroy(njb_songid_frame_t *frame)
Definition: songid.c:976
njb_songid_frame_struct::type
u_int8_t type
Definition: libnjb.h:204
njb_playlist_track_struct::prev
struct njb_playlist_track_struct * prev
Definition: libnjb.h:239
njb_eax_struct::name
char * name
Definition: libnjb.h:351
njb_struct::usb_interface
u_int8_t usb_interface
Definition: libnjb.h:186
njb_struct::xfersize
u_int32_t xfersize
Definition: libnjb.h:191
njb_struct::dev
usb_dev_handle * dev
Definition: libnjb.h:184
NJB_Get_Datafile_Tag
njb_datafile_t * NJB_Get_Datafile_Tag(njb_t *njb)
Definition: procedure.c:846
NJB_Error_Geterror
const char * NJB_Error_Geterror(njb_t *njb)
Definition: njb_error.c:368
njb_songid_struct::first
njb_songid_frame_t * first
Definition: libnjb.h:225
NJB_Songid_Findframe
njb_songid_frame_t * NJB_Songid_Findframe(njb_songid_t *song, const char *label)
Definition: songid.c:739
njb_playlist_track_struct::next
struct njb_playlist_track_struct * next
Definition: libnjb.h:240
NJB_Songid_Frame_New_Codec
njb_songid_frame_t * NJB_Songid_Frame_New_Codec(const char *value)
Definition: songid.c:871
NJB_Get_Disk_Usage
int NJB_Get_Disk_Usage(njb_t *njb, u_int64_t *btotal, u_int64_t *bfree)
Definition: procedure.c:657
NJB_Get_Owner_String
char * NJB_Get_Owner_String(njb_t *njb)
Definition: procedure.c:697
njb_playlist_struct::plid
u_int32_t plid
Definition: libnjb.h:255
NJB_Playlist_Track_Destroy
void NJB_Playlist_Track_Destroy(njb_playlist_track_t *track)
Definition: playlist.c:459
njb_playlist_struct::name
char * name
Definition: libnjb.h:248
njb_eax_struct::group
u_int8_t group
Definition: libnjb.h:360
njb_songid_frame_struct::next
njb_songid_frame_t * next
Definition: libnjb.h:215
NJB_Capture
int NJB_Capture(njb_t *njb)
Definition: procedure.c:223
NJB_Send_Firmware
int NJB_Send_Firmware(njb_t *njb, const char *path, NJB_Xfer_Callback *callback, void *data)
Definition: procedure.c:3240
NJB_Reset_Get_Track_Tag
void NJB_Reset_Get_Track_Tag(njb_t *njb)
Definition: procedure.c:460
njb_playlist_struct::_state
int _state
Definition: libnjb.h:249
NJB_Get_Track_Tag
njb_songid_t * NJB_Get_Track_Tag(njb_t *njb)
Definition: procedure.c:503
njb_songid_frame_struct::strval
char * strval
Definition: libnjb.h:209
NJB_Get_Track_fd
int NJB_Get_Track_fd(njb_t *njb, u_int32_t trackid, u_int32_t size, int fd, NJB_Xfer_Callback *callback, void *data)
Definition: procedure.c:980
NJB_Destroy_EAX_Type
void NJB_Destroy_EAX_Type(njb_eax_t *eax)
Definition: procedure.c:1978
njb_eax_struct
Definition: libnjb.h:349
NJB_Get_Device_Name
const char * NJB_Get_Device_Name(njb_t *njb, int type)
Definition: procedure.c:3456
NJB_Get_Keys
njb_keyval_t * NJB_Get_Keys(njb_t *njb)
Definition: procedure.c:3166
njb_struct::device
struct usb_device * device
Definition: libnjb.h:183
NJB_Set_Unicode
void NJB_Set_Unicode(int unicode_flag)
Definition: procedure.c:2833
njb_eax_struct::type
njb_eax_control_t type
Definition: libnjb.h:366
NJB_Songid_Reset_Getframe
void NJB_Songid_Reset_Getframe(njb_songid_t *song)
Definition: songid.c:707
NJB_Get_NJB1_Libcounter
u_int64_t NJB_Get_NJB1_Libcounter(njb_t *njb)
Definition: procedure.c:3203
njb_songid_struct
Definition: libnjb.h:222
njb_songid_struct::nframes
u_int16_t nframes
Definition: libnjb.h:224
NJB_Get_Playlist
njb_playlist_t * NJB_Get_Playlist(njb_t *njb)
Definition: procedure.c:592
njb_playlist_track_struct
Definition: libnjb.h:237
njb_datafile_struct::folder
char * folder
Definition: libnjb.h:281
njb_struct
Definition: libnjb.h:182
NJB_Get_Bitmap_Dimensions
int NJB_Get_Bitmap_Dimensions(njb_t *njb, int *x, int *y, int *bytes)
Definition: procedure.c:3043
NJB_Set_Time
int NJB_Set_Time(njb_t *njb, njb_time_t *time)
Definition: procedure.c:2113
NJB_Songid_Frame_New_Uint32
njb_songid_frame_t * NJB_Songid_Frame_New_Uint32(const char *label, u_int32_t value)
Definition: songid.c:945
njb_songid_struct::cur
njb_songid_frame_t * cur
Definition: libnjb.h:227
njb_struct::device_type
int device_type
Definition: libnjb.h:189
NJB_Get_EAX_Type
njb_eax_t * NJB_Get_EAX_Type(njb_t *njb)
Definition: procedure.c:1952
njb_playlist_track_struct::trackid
u_int32_t trackid
Definition: libnjb.h:238
njb_datafile_struct::timestamp
u_int32_t timestamp
Definition: libnjb.h:288
NJB_Reset_Get_EAX_Type
void NJB_Reset_Get_EAX_Type(njb_t *njb)
Definition: procedure.c:1915
NJB_Playlist_Addtrack
void NJB_Playlist_Addtrack(njb_playlist_t *pl, njb_playlist_track_t *track, unsigned int pos)
Definition: playlist.c:137
NJB_Get_Firmware_Revision
int NJB_Get_Firmware_Revision(njb_t *njb, u_int8_t *major, u_int8_t *minor, u_int8_t *release)
Definition: procedure.c:3509
njb_eax_struct::max_value
int16_t max_value
Definition: libnjb.h:384
NJB_Playlist_Deltrack
void NJB_Playlist_Deltrack(njb_playlist_t *pl, unsigned int pos)
Definition: playlist.c:202
njb_datafile_struct::nextdf
njb_datafile_t * nextdf
Definition: libnjb.h:331
NJB_Error_Dump
void NJB_Error_Dump(njb_t *njb, FILE *fp)
Definition: njb_error.c:418
njb_keyval_struct
Definition: libnjb.h:417
njb_struct::usb_bulk_out_ep
u_int8_t usb_bulk_out_ep
Definition: libnjb.h:188
njb_time_struct
Definition: libnjb.h:403
NJB_Songid_Frame_New_String
njb_songid_frame_t * NJB_Songid_Frame_New_String(const char *label, const char *value)
Definition: songid.c:840
njb_songid_frame_struct::data
union njb_songid_frame_struct::@0 data
njb_struct::usb_config
u_int8_t usb_config
Definition: libnjb.h:185
njb_datafile_struct::filename
char * filename
Definition: libnjb.h:276
njb_songid_frame_struct::u_int8_val
u_int8_t u_int8_val
Definition: libnjb.h:210
NJB_Delete_Playlist
int NJB_Delete_Playlist(njb_t *njb, u_int32_t plid)
Definition: procedure.c:2167
NJB_Playlist_Track_New
njb_playlist_track_t * NJB_Playlist_Track_New(u_int32_t trackid)
Definition: playlist.c:433
NJB_Replace_Track_Tag
int NJB_Replace_Track_Tag(njb_t *njb, u_int32_t trackid, njb_songid_t *songid)
Definition: procedure.c:2895
njb_playlist_struct
Definition: libnjb.h:247
njb_datafile_struct
Definition: libnjb.h:275
NJB_Resume_Play
int NJB_Resume_Play(njb_t *njb)
Definition: procedure.c:2616
NJB_Songid_Destroy
void NJB_Songid_Destroy(njb_songid_t *song)
Definition: songid.c:673
NJB_Playlist_Deltrack_TrackID
void NJB_Playlist_Deltrack_TrackID(njb_playlist_t *pl, u_int32_t trackid)
Definition: playlist.c:293
NJB_Discover
int NJB_Discover(njb_t *njbs, int limit, int *n)
Definition: procedure.c:108
NJB_Pause_Play
int NJB_Pause_Play(njb_t *njb)
Definition: procedure.c:2590
njb_songid_frame_struct::label
char * label
Definition: libnjb.h:203
NJB_Songid_Frame_New_Uint16
njb_songid_frame_t * NJB_Songid_Frame_New_Uint16(const char *label, u_int16_t value)
Definition: songid.c:912
njb_songid_struct::next
njb_songid_t * next
Definition: libnjb.h:228
NJB_Stop_Play
int NJB_Stop_Play(njb_t *njb)
Definition: procedure.c:2643
NJB_Send_File
int NJB_Send_File(njb_t *njb, const char *path, const char *name, const char *folder, NJB_Xfer_Callback *callback, void *data, u_int32_t *fileid)
Definition: procedure.c:1723
NJB_Release
int NJB_Release(njb_t *njb)
Definition: procedure.c:266
njb_datafile_struct::dfid
u_int32_t dfid
Definition: libnjb.h:323
NJB_Reset_Get_Playlist
void NJB_Reset_Get_Playlist(njb_t *njb)
Definition: procedure.c:556
njb_datafile_struct::filesize
u_int64_t filesize
Definition: libnjb.h:325
NJB_Play_Track
int NJB_Play_Track(njb_t *njb, u_int32_t trackid)
Definition: procedure.c:2503
njb_time_struct::weekday
int16_t weekday
Definition: libnjb.h:407
NJB_Queue_Track
int NJB_Queue_Track(njb_t *njb, u_int32_t trackid)
Definition: procedure.c:2551
NJB_Set_Owner_String
int NJB_Set_Owner_String(njb_t *njb, const char *name)
Definition: procedure.c:746
NJB_Delete_Datafile
int NJB_Delete_Datafile(njb_t *njb, u_int32_t fileid)
Definition: procedure.c:2453
NJB_Playlist_Reset_Gettrack
void NJB_Playlist_Reset_Gettrack(njb_playlist_t *pl)
Definition: playlist.c:354
NJB_Destroy_Time
void NJB_Destroy_Time(njb_time_t *time)
Definition: procedure.c:2152
njb_eax_struct::min_value
int16_t min_value
Definition: libnjb.h:379