1 /*
2  *   cdinfo - CD Information Management Library
3  *
4  *   Copyright (C) 1993-2004  Ti Kan
5  *   E-mail: xmcd@amb.org
6  *
7  *   This program is free software; you can redistribute it and/or modify
8  *   it under the terms of the GNU General Public License as published by
9  *   the Free Software Foundation; either version 2 of the License, or
10  *   (at your option) any later version.
11  *
12  *   This program is distributed in the hope that it will be useful,
13  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *   GNU General Public License for more details.
16  *
17  *   You should have received a copy of the GNU General Public License
18  *   along with this program; if not, write to the Free Software
19  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20  *
21  */
22 #ifndef __CDINFO_H__
23 #define __CDINFO_H__
24 
25 #ifndef lint
26 static char *_cdinfo_h_ident_ = "@(#)cdinfo.h	7.99 04/04/20";
27 #endif
28 
29 
30 /* Macros to extract info from cdinfo_ret_t */
31 #define CDINFO_SET_CODE(stat, arg)	((stat) | (arg) << 16)
32 #define CDINFO_GET_STAT(code)		((code) & 0xffff)
33 #define CDINFO_GET_ARG(code)		((code) >> 16)
34 
35 #if defined(__VMS) && !defined(SYNCHRONOUS)
36 #define SYNCHRONOUS		/* VMS must always run in SYNCHRONOUS mode */
37 #endif
38 
39 #ifdef SYNCHRONOUS
40 #define CH_RET(code)						\
41 	{							\
42 		if ((code) == 0)				\
43 			errno = 0;				\
44 		return CDINFO_SET_CODE((code), (errno));	\
45 	}
46 #else
47 #define CH_RET(code)		_exit((code))
48 #endif
49 
50 /* Error status codes */
51 #define OPEN_ERR		50
52 #define CLOSE_ERR		51
53 #define SETUID_ERR		52
54 #define READ_ERR		53
55 #define WRITE_ERR		54
56 #define LINK_ERR		55
57 #define FORK_ERR		56
58 #define KILLED_ERR		57
59 #define WAIT_ERR		58
60 #define MEM_ERR			60
61 #define CMD_ERR			61
62 #define AUTH_ERR		62
63 #define FLUSH_ERR		63
64 #define INIT_ERR		64
65 #define OFLN_ERR		65
66 #define REGI_ERR		66
67 #define NAME_ERR		67
68 #define HINT_ERR		68
69 #define MAIL_ERR		69
70 #define BUSY_ERR		70
71 #define ARG_ERR			71
72 #define SUBMIT_ERR		72
73 #define LIBCDDB_ERR		73
74 
75 /* Default HTTP port */
76 #ifndef HTTP_PORT
77 #define HTTP_PORT		80
78 #endif
79 
80 /* cdinfoPath and XMCD_CDINFOPATH component separator character */
81 #define CDINFOPATH_SEPCHAR	';'
82 
83 /* Web browser invocation script name */
84 #define CDINFO_GOBROWSER	"gobrowser"
85 
86 
87 /* Message dialog macros */
88 #define CDINFO_FATAL(msg)		{				\
89 	if (cdinfo_clinfo->fatal_msg != NULL && !cdinfo_ischild)	\
90 		cdinfo_clinfo->fatal_msg(app_data.str_fatal, (msg));	\
91 	else {								\
92 		(void) fprintf(errfp, "Fatal: %s\n", (msg));		\
93 		_exit(1);						\
94 	}								\
95 }
96 #define CDINFO_WARNING(msg)		{				\
97 	if (cdinfo_clinfo->warning_msg != NULL && !cdinfo_ischild)	\
98 		cdinfo_clinfo->warning_msg(app_data.str_warning, (msg));\
99 	else								\
100 		(void) fprintf(errfp, "Warning: %s\n", (msg));		\
101 }
102 #define CDINFO_INFO(msg)		{				\
103 	if (cdinfo_clinfo->info_msg != NULL && !cdinfo_ischild)		\
104 		cdinfo_clinfo->info_msg(app_data.str_info, (msg));	\
105 	else								\
106 		(void) fprintf(errfp, "Info: %s\n", (msg));		\
107 }
108 #define CDINFO2_INFO(msg, txt)		{				\
109 	if (cdinfo_clinfo->info2_msg != NULL && !cdinfo_ischild)	\
110 		cdinfo_clinfo->info2_msg(app_data.str_info,(msg),(txt));\
111 	else								\
112 		(void) fprintf(errfp, "Info: %s\n%s\n", (msg), (txt));	\
113 }
114 
115 
116 #define XMCD_CLIENT_ID	"8885248"		/* Client ID */
117 #define Cddb_ISCDDB1	0x000cddb1		/* CDDB1 server interface */
118 #define CDINFO_PRODUCTION			/* Enable CDDB submit */
119 
120 
121 /* cdinfo services return type */
122 typedef int		cdinfo_ret_t;
123 
124 
125 /* Client information structure */
126 typedef struct {
127 	char	prog[FILE_PATH_SZ];		/* Client program name */
128 	char	host[HOST_NAM_SZ];		/* Client host name */
129 	char	user[STR_BUF_SZ];		/* Client user name */
130 	bool_t	(*isdemo)(void);		/* Demo mode func */
131 	curstat_t * (*curstat_addr)(void);	/* Current status structure */
132 	void	(*fatal_msg)(char *, char *);	/* Fatal message popup func */
133 	void	(*warning_msg)(char *, char *);	/* Warning message popup func */
134 	void	(*info_msg)(char *, char *);	/* Info message popup func */
135 	void	(*info2_msg)(char *, char *, char *);
136 						/* Info2 message popup func */
137 	void	(*workproc)(int);		/* Function to run while
138 						 * waiting for I/O
139 						 */
140 	int	arg;				/* Argument to workproc */
141 
142 } cdinfo_client_t;
143 
144 
145 /* Definitions for the type field in cdinfo_path_t */
146 #define CDINFO_LOC	1
147 #define CDINFO_RMT	2
148 #define CDINFO_CDTEXT	3
149 
150 /* CD info path structure */
151 typedef struct cdinfo_path {
152 	int		type;			/* CDINFO_LOC or CDINFO_RMT */
153 	char		*categ;			/* CDDB1-style category */
154 	char		*path;			/* File path */
155 	struct cdinfo_path *next;		/* Link to next path */
156 } cdinfo_path_t;
157 
158 
159 /* Full name info structure */
160 typedef struct {
161 	char		*dispname;		/* display name */
162 	char		*lastname;		/* last name */
163 	char		*firstname;		/* first name */
164 	char		*the;			/* "The" */
165 } cdinfo_fname_t;
166 
167 
168 /* Disc information structure */
169 /* CD info entry multiple match list structure */
170 typedef struct cdinfo_match {
171 	char		*artist;		/* CD artist of match */
172 	char		*title;			/* CD title of match */
173 	char		*genre;			/* CD genre */
174 	long		tag;			/* Selection tag */
175 	struct cdinfo_match *next;		/* Link to next match */
176 } cdinfo_match_t;
177 
178 
179 /* CD genre structure */
180 typedef struct cdinfo_genre {
181 	char		*id;			/* Genre ID */
182 	char		*name;			/* Genre name */
183 	void		*aux;			/* Auxiliary field */
184 	void		*aux2;			/* Auxiliary field */
185 	void		*aux3;			/* Auxiliary field */
186 	void		*aux4;			/* Auxiliary field */
187 	struct cdinfo_genre *child;		/* Child-genre pointer */
188 	struct cdinfo_genre *parent;		/* Parent-genre pointer */
189 	struct cdinfo_genre *next;		/* Next genre pointer */
190 } cdinfo_genre_t;
191 
192 
193 /* Region structure */
194 typedef struct cdinfo_region {
195 	char		*id;			/* Region ID */
196 	char		*name;			/* Region name */
197 	struct cdinfo_region *next;		/* Next region pointer */
198 } cdinfo_region_t;
199 
200 
201 /* Language structure */
202 typedef struct cdinfo_lang {
203 	char		*id;			/* Language ID */
204 	char		*name;			/* Language name */
205 	struct cdinfo_lang *next;		/* Next language pointer */
206 } cdinfo_lang_t;
207 
208 
209 /* Role structure */
210 typedef struct cdinfo_role {
211 	char		*id;			/* Role ID */
212 	char		*name;			/* Role name */
213 	void		*aux;			/* Auxiliary field */
214 	struct cdinfo_role *child;		/* Child-role pointer */
215 	struct cdinfo_role *parent;		/* Parent-role pointer */
216 	struct cdinfo_role *next;		/* Next role pointer */
217 } cdinfo_role_t;
218 
219 
220 /* Credit structure */
221 typedef struct cdinfo_credit {
222 	struct {
223 		cdinfo_role_t	*role;		/* Role */
224 		char		*name;		/* Name */
225 		cdinfo_fname_t	fullname;	/* Full name */
226 	}		crinfo;			/* Credit information */
227 	char		*notes;			/* Credit notes */
228 	struct cdinfo_credit *prev;		/* Prev credit pointer */
229 	struct cdinfo_credit *next;		/* Next credit pointer */
230 } cdinfo_credit_t;
231 
232 
233 /* Segment structure */
234 typedef struct cdinfo_segment {
235 	char		*name;			/* Name */
236 	char		*notes;			/* Notes */
237 	char		*start_track;		/* Start track */
238 	char		*start_frame;		/* Start Frame */
239 	char		*end_track;		/* End track */
240 	char		*end_frame;		/* End Frame */
241 	cdinfo_credit_t	*credit_list;		/* Credits list */
242 	struct cdinfo_segment *prev;		/* Prev segment pointer */
243 	struct cdinfo_segment *next;		/* Next segment pointer */
244 } cdinfo_segment_t;
245 
246 
247 /* User registration structure */
248 typedef struct {
249 	char	*handle;			/* User handle */
250 	char	*passwd;			/* password */
251 	char	*vpasswd;			/* verify password */
252 	char	*hint;				/* Password hint */
253 	char	*email;				/* E-mail address */
254 	char	*region;			/* Region */
255 	char	*postal;			/* Postal code */
256 	char	*age;				/* Age */
257 	char	*gender;			/* Gender */
258 	bool_t	allowemail;			/* Allow e-mail */
259 	bool_t	allowstats;			/* Allow stats */
260 } cdinfo_ureg_t;
261 
262 
263 /* CDDB handle structure */
264 typedef struct {
265 	void		*ctrlp;			/* CDDB control pointer */
266 } cdinfo_cddb_t;
267 
268 
269 typedef struct {
270 	bool_t		compilation;		/* Is compilation CD */
271 	cdinfo_fname_t	artistfname;		/* Artist Full name */
272 	char		*artist;		/* Artist */
273 	char		*title;			/* Title */
274 	char		*sorttitle;		/* Sort title */
275 	char		*title_the;		/* Sort title "The" */
276 	char		*year;			/* Year */
277 	char		*label;			/* Label */
278 	char		*genre;			/* Primary genre ID */
279 	char		*genre2;		/* Secondary genre ID */
280 	char		*dnum;			/* Disc number in set */
281 	char		*tnum;			/* Number of discs in set */
282 	char		*region;		/* Region ID */
283 	char		*notes;			/* Disc notes */
284 	char		*mediaid;		/* Media ID */
285 	char		*muiid;			/* Media unique ID */
286 	char		*titleuid;		/* Title unique ID */
287 	char		*revision;		/* Revision */
288 	char		*revtag;		/* Revision tag */
289 	char		*certifier;		/* Certifier */
290 	char		*lang;			/* language ID */
291 	cdinfo_credit_t	*credit_list;		/* Credits list */
292 	cdinfo_segment_t *segment_list;		/* Segments list */
293 } cdinfo_disc_t;
294 
295 
296 /* Track information structure */
297 typedef struct {
298 	cdinfo_fname_t	artistfname;		/* Artist Full name */
299 	char		*artist;		/* Track artist */
300 	char		*title;			/* Track title */
301 	char		*sorttitle;		/* Sort title */
302 	char		*title_the;		/* Sort title "The" */
303 	char		*year;			/* Year */
304 	char		*label;			/* Label */
305 	char		*genre;			/* Primary genre */
306 	char		*genre2;		/* Secondary genre */
307 	char		*bpm;			/* Beats per minute */
308 	char		*notes;			/* Track notes */
309 	char		*isrc;			/* Intl Std Recording Code */
310 	cdinfo_credit_t	*credit_list;		/* Credits list */
311 } cdinfo_track_t;
312 
313 
314 /* wwwwarp.cfg file name */
315 #define WWWWARP_CFG	"wwwwarp.cfg"
316 
317 /* Definitions for the type field in w_ent_t */
318 #define WTYPE_NULL	0
319 #define WTYPE_TITLE	1
320 #define WTYPE_SEP	2
321 #define WTYPE_SEP2	3
322 #define WTYPE_SUBMENU	4
323 #define WTYPE_GOTO	5
324 #define WTYPE_ABOUT	6
325 #define WTYPE_HELP	7
326 #define WTYPE_MOTD	8
327 #define WTYPE_DISCOG	9
328 #define WTYPE_BROWSER	10
329 #define WTYPE_GEN	11
330 #define WTYPE_ALBUM	12
331 #define WTYPE_SUBMITURL	13
332 
333 /* wwwwarp menu entry structure */
334 typedef struct w_ent {
335 	int		type;		/* Entry type */
336 	char		*name;		/* Menu name */
337 	char		*desc;		/* Entry description/label */
338 	char		*arg;		/* Entry argument */
339 	char		*modifier;	/* Shortcut key modifier */
340 	char		*keyname;	/* Shortcut key name */
341 	url_attrib_t	attrib;		/* URL attribute */
342 	void		*aux;		/* Auxiliary field */
343 	struct w_ent	*submenu;	/* Submenu pointer */
344 	struct w_ent	*nextent;	/* Next entry pointer */
345 	struct w_ent	*nextmenu;	/* Next menu pointer */
346 	struct w_ent	*chknext;	/* Link pointer for circular check */
347 } w_ent_t;
348 
349 
350 /* CDDB URL information structure - Note: No URL is actually stored in
351  * this structure.  It's handled internally by CDDB via an index number.
352  */
353 typedef struct cdinfo_url {
354 	int		wtype;			/* WTYPE_GEN or WTYPE_ALBUM */
355 	char		*type;			/* Type */
356 	char		*href;			/* URL string */
357 	char		*displink;		/* Display link */
358 	char		*disptext;		/* Display text */
359 	char		*categ;			/* Category */
360 	char		*desc;			/* Description */
361 	char		*size;			/* Size */
362 	char		*weight;		/* Weight */
363 	char		*modifier;		/* Shortcut key modifier */
364 	char		*keyname;		/* Shortcut key name */
365 	void		*aux;			/* Auxiliary */
366 	struct cdinfo_url *next;		/* Next URL */
367 } cdinfo_url_t;
368 
369 
370 /* Pipe data direction definition (for cdinfo_openpipe) */
371 #define CDINFO_DATAIN	0
372 #define CDINFO_DATAOUT	1
373 
374 #define XMCD_PIPESIG	"%_XmCd_% "
375 #define CDINFO_CACHESZ	1024
376 
377 /* CD info pipe info structure */
378 typedef struct {
379 	int		fd;			/* File descriptor */
380 	int		rw;			/* O_RDONLY or O_WRONLY */
381 	int		pos;			/* Cache position */
382 	int		cnt;			/* Cache count */
383 	unsigned char	*cache;			/* I/O cache */
384 } cdinfo_pinfo_t;
385 
386 /* CD info pipe structure */
387 typedef struct {
388 	int		dir;			/* Pipe data direction */
389 	cdinfo_pinfo_t	r;			/* Read pipe */
390 	cdinfo_pinfo_t	w;			/* Write pipe */
391 } cdinfo_pipe_t;
392 
393 
394 /* Flags bits for cdinfo_incore_t */
395 #define CDINFO_CHANGED	0x0001			/* In-core info was edited */
396 #define CDINFO_MATCH	0x0002			/* CD info load success */
397 #define CDINFO_NEEDREG	0x0004			/* CDDB need registration */
398 #define CDINFO_FROMLOC	0x0008			/* CD info from local DB */
399 #define CDINFO_FROMCDT	0x0010			/* CD info from CD-TEXT */
400 
401 /* In-core CD database info structure */
402 typedef struct {
403 	word32_t	discid;			/* Integer disc identifier */
404 	int		flags;			/* Flags */
405 
406 	cdinfo_disc_t	disc;			/* Disk information */
407 	cdinfo_track_t	track[MAXTRACK];	/* Track information */
408 	cdinfo_ureg_t	userreg;		/* User registration info */
409 
410 	cdinfo_lang_t	*langlist;		/* CDDB language list */
411 	cdinfo_genre_t	*genrelist;		/* CDDB Genre list */
412 	cdinfo_region_t	*regionlist;		/* CDDB Region list */
413 	cdinfo_role_t	*rolelist;		/* CDDB Role list */
414 	cdinfo_match_t	*matchlist;		/* CDDB match list */
415 	void		*match_aux;		/* Save CddbDiscsPtr */
416 	long		match_tag;		/* user selection tag */
417 
418 	w_ent_t		*wwwwarp_list;		/* wwwWarp menu list */
419 	cdinfo_url_t	*gen_url_list;		/* general URLs list */
420 	cdinfo_url_t	*disc_url_list;		/* album-related URLs list */
421 
422 	cdinfo_path_t	*pathlist;		/* CD info path list */
423 
424 	char		*playorder;		/* Track play order */
425 
426 	cdinfo_cddb_t	*sav_cddbp;		/* Save CDDB pointer */
427 	cdinfo_pipe_t	*sav_rpp;		/* Save pipe pointer */
428 	cdinfo_pipe_t	*sav_spp;		/* Save pipe pointer */
429 
430 	char		*proxy_user;		/* Proxy server user name */
431 	char		*proxy_passwd;		/* Proxy server password */
432 
433 	char		*ctrl_ver;		/* CDDB control version */
434 
435 	di_cdtext_t	cdtext;			/* CD-TEXT information */
436 
437 	char		*cddb_errstr;		/* CDDB error message string */
438 } cdinfo_incore_t;
439 
440 
441 #define DLIST_BUF_SZ	128
442 
443 
444 /* Defines for the type field in cdinfo_dlist_t.  This is made to be
445  * somewhat compatible with xmcd-2.x.
446  */
447 #define CDINFO_DLIST_LOCAL	1		/* Local CD database entry */
448 #define CDINFO_DLIST_REMOTE1	2		/* CDDBP-queried entry */
449 #define CDINFO_DLIST_REMOTE	3		/* HTTP-queried entry */
450 
451 /* Disc list information structure */
452 typedef struct cdinfo_dlist {
453 	char		*device;		/* Device */
454 	int		discno;			/* Disc number */
455 	int		type;			/* Type flags */
456 	word32_t	discid;			/* Integer disc identifier */
457 	char		*genre;			/* CD genre */
458 	char		*artist;		/* CD artist */
459 	char		*title;			/* CD title */
460 	time_t		time;			/* Time */
461 	void		*aux;			/* Auxiliary pointer */
462 	struct cdinfo_dlist *prev;		/* Prev entry on list */
463 	struct cdinfo_dlist *next;		/* Next entry on list */
464 } cdinfo_dlist_t;
465 
466 
467 /* Private functions: for libcdinfo internal use only */
468 #ifdef _CDINFO_INTERN
469 extern void		cdinfo_onterm(int);
470 extern int		cdinfo_sum(int);
471 extern bool_t		cdinfo_forkwait(cdinfo_ret_t *);
472 #ifndef SYNCHRONOUS
473 extern cdinfo_pipe_t	*cdinfo_openpipe(int);
474 extern bool_t		cdinfo_closepipe(cdinfo_pipe_t *);
475 extern bool_t           cdinfo_write_datapipe(cdinfo_pipe_t *, curstat_t *);
476 extern bool_t           cdinfo_read_datapipe(cdinfo_pipe_t *);
477 extern bool_t           cdinfo_write_selpipe(cdinfo_pipe_t *);
478 extern bool_t           cdinfo_read_selpipe(cdinfo_pipe_t *);
479 #endif
480 extern cdinfo_cddb_t	*cdinfo_opencddb(curstat_t *, bool_t, cdinfo_ret_t *);
481 extern bool_t		cdinfo_closecddb(cdinfo_cddb_t *);
482 extern bool_t		cdinfo_initcddb(cdinfo_cddb_t *, cdinfo_ret_t *);
483 extern bool_t		cdinfo_querycddb(cdinfo_cddb_t *, curstat_t *,
484 					 cdinfo_ret_t *);
485 extern bool_t		cdinfo_uregcddb(cdinfo_cddb_t *, cdinfo_ret_t *);
486 extern bool_t		cdinfo_passhintcddb(cdinfo_cddb_t *, cdinfo_ret_t *);
487 extern bool_t		cdinfo_submitcddb(cdinfo_cddb_t *, curstat_t *s,
488 					  cdinfo_ret_t *);
489 extern bool_t		cdinfo_submiturlcddb(cdinfo_cddb_t *, cdinfo_url_t *,
490 					     cdinfo_ret_t *);
491 extern bool_t		cdinfo_flushcddb(cdinfo_cddb_t *);
492 extern bool_t		cdinfo_infobrowsercddb(cdinfo_cddb_t *);
493 extern bool_t		cdinfo_urlcddb(cdinfo_cddb_t *, int, int);
494 extern void		cdinfo_free_matchlist(void);
495 extern char		*cdinfo_skip_whitespace(char *);
496 extern char		*cdinfo_skip_nowhitespace(char *);
497 extern char		*cdinfo_fgetline(FILE *);
498 extern void		cdinfo_wwwchk_cleanup(void);
499 extern bool_t		cdinfo_wwwmenu_chk(w_ent_t *, bool_t);
500 extern void		cdinfo_scan_url_attrib(char *, url_attrib_t *);
501 extern bool_t		cdinfo_add_pathent(char *);
502 extern bool_t		cdinfo_load_locdb(char *, char *, curstat_t *, int *);
503 extern bool_t		cdinfo_out_discog(char *, curstat_t *, char *);
504 extern void		cdinfo_map_cdtext(curstat_t *, di_cdtext_t *);
505 
506 /* The following two funcs are in libcddbkey */
507 extern bool_t		cddb_ifver(void);
508 extern bool_t		cddb_setkey(cdinfo_cddb_t *, cdinfo_client_t *,
509 				    appdata_t *, curstat_t *, FILE *);
510 
511 #endif /* _CDINFO_INTERN */
512 
513 
514 /* Public functions */
515 extern cdinfo_incore_t	*cdinfo_addr(void);
516 extern word32_t		cdinfo_discid(curstat_t *);
517 extern char		*cdinfo_txtreduce(char *, bool_t);
518 extern void		cdinfo_tmpl_to_url(curstat_t *, char *, char *, int);
519 extern int		cdinfo_url_len(char *, url_attrib_t *, int *);
520 extern void		cdinfo_init(cdinfo_client_t *);
521 extern void		cdinfo_halt(curstat_t *);
522 extern void		cdinfo_reinit(void);
523 extern cdinfo_ret_t	cdinfo_submit(curstat_t *);
524 extern cdinfo_ret_t	cdinfo_submit_url(curstat_t *, cdinfo_url_t *);
525 extern cdinfo_ret_t	cdinfo_flush(curstat_t *);
526 extern cdinfo_ret_t	cdinfo_offline(curstat_t *);
527 extern cdinfo_ret_t	cdinfo_load(curstat_t *);
528 extern cdinfo_ret_t	cdinfo_load_matchsel(curstat_t *);
529 extern cdinfo_ret_t	cdinfo_load_prog(curstat_t *);
530 extern cdinfo_ret_t	cdinfo_save_prog(curstat_t *);
531 extern cdinfo_ret_t	cdinfo_del_prog(void);
532 extern cdinfo_ret_t	cdinfo_reguser(curstat_t *s);
533 extern cdinfo_ret_t	cdinfo_getpasshint(curstat_t *s);
534 extern cdinfo_ret_t	cdinfo_go_musicbrowser(curstat_t *);
535 extern cdinfo_ret_t	cdinfo_go_url(char *url);
536 extern cdinfo_ret_t	cdinfo_go_cddburl(curstat_t *, int, int);
537 extern cdinfo_ret_t	cdinfo_gen_discog(curstat_t *);
538 extern void		cdinfo_clear(bool_t);
539 extern void		cdinfo_hist_init(void);
540 extern cdinfo_ret_t	cdinfo_hist_addent(cdinfo_dlist_t *, bool_t);
541 extern cdinfo_ret_t	cdinfo_hist_delent(cdinfo_dlist_t *, bool_t);
542 extern cdinfo_ret_t	cdinfo_hist_delall(bool_t);
543 extern cdinfo_dlist_t	*cdinfo_hist_list(void);
544 extern void		cdinfo_chgr_init(void);
545 extern cdinfo_ret_t	cdinfo_chgr_addent(cdinfo_dlist_t *);
546 extern cdinfo_dlist_t	*cdinfo_chgr_list(void);
547 extern cdinfo_genre_t	*cdinfo_genre(char *);
548 extern char		*cdinfo_genre_name(char *);
549 extern char		*cdinfo_genre_path(char *);
550 extern char		*cdinfo_region_name(char *);
551 extern char		*cdinfo_lang_name(char *);
552 extern cdinfo_role_t	*cdinfo_role(char *);
553 extern char		*cdinfo_role_name(char *);
554 extern void		cdinfo_load_cancel(void);
555 extern int		cdinfo_cddb_ver(void);
556 extern char		*cdinfo_cddbctrl_ver(void);
557 extern bool_t		cdinfo_cddb_iscfg(void);
558 extern bool_t		cdinfo_cdtext_iscfg(void);
559 extern void		cdinfo_wwwwarp_parmload(void);
560 extern bool_t		cdinfo_wwwwarp_ckkey(char *);
561 extern void		cdinfo_curfileupd(void);
562 extern bool_t		cdinfo_issync(void);
563 extern void		cdinfo_dump_incore(curstat_t *s);
564 
565 #endif	/* __CDINFO_H__ */
566 
567