File: main.h

package info (click to toggle)
libcddb 1.3.2-7.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,376 kB
  • sloc: sh: 10,958; ansic: 4,722; makefile: 44
file content (56 lines) | stat: -rw-r--r-- 1,788 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
    $Id: main.h,v 1.15 2006/10/15 08:54:27 airborne Exp $

    Copyright (C) 2003, 2004, 2005 Kris Verbeeck <airborne@advalvas.be>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

#if HAVE_CONFIG_H
#include <config.h>
#endif

#include <cddb/cddb.h>

/* generic error code */
#define GENERIC_ERROR -1

/* free pointer when it's pointing at something */
#define FREE_NOT_NULL(p) if (p) { free(p); p = NULL; }

/**
 * Prints out an error string and exits the program with the provided
 * error code.
 *
 * @param err Error code.
 * @param fmt A printf style format string.
 */
void error_exit(int err, const char *fmt, ...);

void do_query(cddb_conn_t *conn, cddb_disc_t *disc, int quiet);

cddb_disc_t *do_read(cddb_conn_t *conn, const char *category, int discid, int quiet);

void do_display(cddb_disc_t *disc);

cddb_disc_t *cd_read(char *device);

cddb_disc_t *cd_create(int dlength, int tcount, int *foffset, int use_time);

void do_sites(cddb_conn_t *conn);

void do_search(cddb_conn_t *conn, cddb_disc_t *disc, const char *str, int quiet);

void do_album(cddb_conn_t *conn, cddb_disc_t *disc, int quiet);