57 #ifndef __NJB__PROTO3__H
58 #define __NJB__PROTO3__H
63 #define NJB3_SHORTREAD_BUFSIZE 1024
66 #define NJB3_CHUNK_SIZE 0x100000U
67 #define NJB3_FIRMWARE_CHUNK_SIZE 0x40000U
68 #define NJB3_DEFAULT_GET_FILE_BLOCK_SIZE 0x2000U
69 #define NJB3_DEFAULT_SEND_FILE_BLOCK_SIZE 0x2000U
80 #define NJB3_CODECS_FRAME_ID 0x0001U
81 #define NJB3_DISKUTIL_FRAME_ID 0x0002U
82 #define NJB3_PRODID_FRAME_ID 0x0003U
88 #define NJB3_LOCKED_FRAME_ID 0x0006U
89 #define NJB3_FNAME_FRAME_ID 0x0007U
90 #define NJB3_UNKNOWN1_FRAME_ID 0x0008U
91 #define NJB3_KEY_FRAME_ID 0x000aU
92 #define NJB3_CODEC_FRAME_ID 0x000bU
93 #define NJB3_POSTID_FRAME_ID 0x000cU
94 #define NJB3_DIR_FRAME_ID 0x000dU
95 #define NJB3_FILESIZE_FRAME_ID 0x000eU
102 #define NJB3_FILECOUNT_FRAME_ID 0x0013U
103 #define NJB3_VALUE_FRAME_ID 0x0014U
104 #define NJB3_JUKEBOXID_FRAME_ID 0x0015U
105 #define NJB3_FILETIME_FRAME_ID 0x0016U
106 #define NJB3_UNKNOWN6_FRAME_ID 0x0017U
107 #define NJB3_FILEFLAGS_FRAME_ID 0x0018U
112 #define NJB3_ALBUM_FRAME_ID 0x0101U
113 #define NJB3_ARTIST_FRAME_ID 0x0102U
114 #define NJB3_GENRE_FRAME_ID 0x0103U
115 #define NJB3_TITLE_FRAME_ID 0x0104U
116 #define NJB3_LENGTH_FRAME_ID 0x0105U
117 #define NJB3_TRACKNO_FRAME_ID 0x0106U
118 #define NJB3_YEAR_FRAME_ID 0x0107U
128 #define NJB3_SMARTPAR_FRAME_ID 0x010aU
137 #define NJB3_PLAYINFO_FRAME_ID 0x010bU
138 #define NJB3_SEEKTRACK_FRAME_ID 0x010cU
139 #define NJB3_EAX_TYPENAME 0x010eU
140 #define NJB3_PLNAME_FRAME_ID 0x010fU
155 #define NJB3_TIME_FRAME_ID 0x0110U
156 #define NJB3_ALBUMCNT_FRAME_ID 0x0111U
157 #define NJB3_TRACKCNT_FRAME_ID 0x0112U
158 #define NJB3_OWNER_FRAME_ID 0x0113U
168 #define NJB3_BATTERY_FRAME_ID 0x0114U
169 #define NJB3_PLCNT_FRAME_ID 0x0115U
181 #define NJB3_PLAYTRACK_FRAME_ID 0x0119U
187 #define NJB3_UNKNOWN4_FRAME_ID 0x011aU
188 #define NJB3_PLTRACKS_FRAME_ID 0x011cU
197 #define NJB3_MINMAX_ID 0x0201U
198 #define NJB3_EAX_ACTIVE_ID 0x0202U
200 #define NJB3_VOLUME_FRAME_ID 0x0203U
201 #define NJB3_ENV_FRAME_ID 0x0204U
202 #define NJB3_EQ_FRAME_ID 0x0205U
203 #define NJB3_SPAT_FRAME_ID 0x0206U
204 #define NJB3_TSCALE_FRAME_ID 0x0207U
205 #define NJB3_SMARTVOL_FRAME_ID 0x0208U
206 #define NJB3_EAXACTIVE_FRAME_ID 0x020aU
207 #define NJB3_EAXID_FRAME_ID 0x020bU
208 #define NJB3_EAX_INDEX_ID 0x020cU
209 #define NJB3_KEYVALUE_FRAME_ID 0x1400U
213 #define NJB3_FILE_DATABASE 0x0000U
214 #define NJB3__PLAYLIST_DATABASE 0x0001U
215 #define NJB3_TRACK_DATABASE 0x0002U
218 #define NJB3_CODEC_MP3_ID_OLD 0x0000U
219 #define NJB3_CODEC_WAV_ID 0x0001U
220 #define NJB3_CODEC_MP3_ID 0x0002U
221 #define NJB3_CODEC_WMA_ID 0x0003U
228 #define NJB3_CODEC_AA_ID 0x0007U
229 #define NJB3_CODEC_PROTECTED_WMA_ID 0x0203U
232 #define NJB3_START_PLAY 0x00
233 #define NJB3_STOP_PLAY 0x01
234 #define NJB3_PAUSE_PLAY 0x02
235 #define NJB3_RESUME_PLAY 0x03
238 #define NJB3_STATUS_OK 0x0000U
239 #define NJB3_STATUS_EMPTY 0x0001U
240 #define NJB3_STATUS_TRANSFER_ERROR 0x0002U
241 #define NJB3_STATUS_BAD_FILESIZE 0x0003U
242 #define NJB3_STATUS_NOTIMPLEMENTED 0x0004U
243 #define NJB3_STATUS_NOTEXIST 0x0005U
244 #define NJB3_STATUS_PROTECTED 0x000cU
245 #define NJB3_STATUS_EMPTY_CHUNK 0x000eU
262 #define njb3_start_play(njb) njb3_ctrl_playing(njb, NJB3_START_PLAY)
263 #define njb3_stop_play(njb) njb3_ctrl_playing(njb, NJB3_STOP_PLAY)
264 #define njb3_pause_play(njb) njb3_ctrl_playing(njb, NJB3_PAUSE_PLAY)
265 #define njb3_resume_play(njb) njb3_ctrl_playing(njb, NJB3_RESUME_PLAY)
270 int get_extended_tag_info;
277 int current_playing_track;
312 int njb3_set_bitmap(
njb_t *njb, u_int16_t x_size, u_int16_t y_size,
const unsigned char *bitmap);
313 int njb3_current_track (
njb_t *njb, u_int16_t * track);
314 int njb3_elapsed_time (
njb_t *njb, u_int16_t * elapsed,
int * change);
315 int njb3_play_track (
njb_t *njb, u_int32_t trackid);
316 int njb3_queue_track (
njb_t *njb, u_int32_t trackid);
317 int njb3_clear_play_queue(
njb_t *njb);
318 int njb3_ctrl_playing (
njb_t *njb,
int cmd);
319 int njb3_seek_track (
njb_t *njb, u_int32_t position);
321 int njb3_ping (
njb_t *njb,
int type);
323 int njb3_readid (
njb_t *njb, u_int8_t *sdmiid);
324 int njb3_capture (
njb_t *njb);
325 int njb3_release (
njb_t *njb);
326 int njb3_get_disk_usage (
njb_t *njb, u_int64_t *totalbytes, u_int64_t *freebytes);
327 int njb3_turnoff_flashing(
njb_t *njb);
328 int njb3_get_owner_string (
njb_t *njb,
char *name);
329 int njb3_set_owner_string (
njb_t *njb,
const char *name);
332 int njb3_reset_get_track_tag (
njb_t *njb);
338 int njb3_read_keys(
njb_t *njb);
342 u_int32_t njb3_create_file(
njb_t *njb,
unsigned char *ptag, u_int32_t tagsize, u_int16_t database);
343 u_int32_t njb3_send_file_chunk(
njb_t *njb,
unsigned char *chunk, u_int32_t chunksize, u_int32_t fileid);
344 int njb3_send_file_complete(
njb_t *njb, u_int32_t fileid);
345 int njb3_create_folder(
njb_t *njb,
const char *name, u_int32_t *folderid);
346 int njb3_delete_item(
njb_t *njb, u_int32_t itemid);
352 int njb3_adjust_volume(
njb_t *njb, u_int16_t value);
354 int njb3_adjust_eax(
njb_t *njb, u_int16_t eaxid, u_int16_t patchindex, u_int16_t active, u_int16_t scalevalue);
355 void njb3_read_eaxtypes(
njb_t *njb);