cddb.h | cddb.h | |||
---|---|---|---|---|
/* | /* | |||
$Id: cddb.h,v 1.9 2004/07/18 07:23:09 airborne Exp $ | $Id: cddb.h,v 1.11 2005/04/08 01:45:48 rockyb Exp $ | |||
Copyright (C) 2003, 2004 Kris Verbeeck <airborne@advalvas.be> | Copyright (C) 2003, 2004, 2005 Kris Verbeeck <airborne@advalvas.be> | |||
This library is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU Library General Public | modify it under the terms of the GNU Library General Public | |||
License as published by the Free Software Foundation; either | License as published by the Free Software Foundation; either | |||
version 2 of the License, or (at your option) any later version. | version 2 of the License, or (at your option) any later version. | |||
This library is distributed in the hope that it will be useful, | This library is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
Library General Public License for more details. | Library General Public License for more details. | |||
You should have received a copy of the GNU Library General Public | You should have received a copy of the GNU Library General Public | |||
License along with this library; if not, write to the | License along with this library; if not, write to the | |||
Free Software Foundation, Inc., 59 Temple Place - Suite 330, | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |||
Boston, MA 02111-1307, USA. | Boston, MA 02111-1307, USA. | |||
*/ | */ | |||
#ifndef CDDB_H | #ifndef CDDB_H | |||
#define CDDB_H 1 | #define CDDB_H 1 | |||
#include <cddb/version.h> | ||||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
#include <cddb/cddb_config.h> | #include <cddb/cddb_config.h> | |||
#include <cddb/cddb_error.h> | #include <cddb/cddb_error.h> | |||
#include <cddb/cddb_track.h> | #include <cddb/cddb_track.h> | |||
#include <cddb/cddb_disc.h> | #include <cddb/cddb_disc.h> | |||
#include <cddb/cddb_conn.h> | #include <cddb/cddb_conn.h> | |||
#include <cddb/cddb_cmd.h> | #include <cddb/cddb_cmd.h> | |||
#include <cddb/cddb_log.h> | #include <cddb/cddb_log.h> | |||
/** | /** | |||
* \mainpage libCDDB, a C API for CDDB server access | * \mainpage libCDDB, a C API for CDDB server access | |||
*/ | */ | |||
/** | ||||
* Initializes the library. This is used to setup any globally used | ||||
* variables. The first time you create a new CDDB connection structure | ||||
* the library will automatically initialize itself. So, there is no | ||||
* need to explicitly call this function. | ||||
*/ | ||||
void libcddb_init(void); | ||||
/** | ||||
* Frees up any global (cross connection) resources. You should call | ||||
* this function before terminating your program. Using any library | ||||
* calls after shutting down are bound to give problems. | ||||
*/ | ||||
void libcddb_shutdown(void); | ||||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#endif /* CDDB_H */ | #endif /* CDDB_H */ | |||
End of changes. 4 change blocks. | ||||
2 lines changed or deleted | 19 lines changed or added | |||
cddb_cmd.h | cddb_cmd.h | |||
---|---|---|---|---|
/* | /* | |||
$Id: cddb_cmd.h,v 1.12 2004/07/21 16:08:49 airborne Exp $ | $Id: cddb_cmd.h,v 1.13 2005/03/11 21:29:29 airborne Exp $ | |||
Copyright (C) 2003, 2004 Kris Verbeeck <airborne@advalvas.be> | Copyright (C) 2003, 2004, 2005 Kris Verbeeck <airborne@advalvas.be> | |||
This library is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU Library General Public | modify it under the terms of the GNU Library General Public | |||
License as published by the Free Software Foundation; either | License as published by the Free Software Foundation; either | |||
version 2 of the License, or (at your option) any later version. | version 2 of the License, or (at your option) any later version. | |||
This library is distributed in the hope that it will be useful, | This library is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
Library General Public License for more details. | Library General Public License for more details. | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
cddb_config.h | cddb_config.h | |||
---|---|---|---|---|
/* | /* | |||
$Id: cddb_config.h.in,v 1.2 2004/07/07 10:29:24 rockyb Exp $ | $Id: cddb_config.h.in,v 1.3 2005/03/11 21:29:29 airborne Exp $ | |||
Copyright (C) 2004 Kris Verbeeck <airborne@advalvas.be> | Copyright (C) 2004, 2005 Kris Verbeeck <airborne@advalvas.be> | |||
This library is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU Library General Public | modify it under the terms of the GNU Library General Public | |||
License as published by the Free Software Foundation; either | License as published by the Free Software Foundation; either | |||
version 2 of the License, or (at your option) any later version. | version 2 of the License, or (at your option) any later version. | |||
This library is distributed in the hope that it will be useful, | This library is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
Library General Public License for more details. | Library General Public License for more details. | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
cddb_conn.h | cddb_conn.h | |||
---|---|---|---|---|
/* | /* | |||
$Id: cddb_conn.h,v 1.22 2004/10/15 18:40:08 airborne Exp $ | $Id: cddb_conn.h,v 1.26 2005/05/07 09:16:21 airborne Exp $ | |||
Copyright (C) 2003, 2004 Kris Verbeeck <airborne@advalvas.be> | Copyright (C) 2003, 2004, 2005 Kris Verbeeck <airborne@advalvas.be> | |||
This library is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU Library General Public | modify it under the terms of the GNU Library General Public | |||
License as published by the Free Software Foundation; either | License as published by the Free Software Foundation; either | |||
version 2 of the License, or (at your option) any later version. | version 2 of the License, or (at your option) any later version. | |||
This library is distributed in the hope that it will be useful, | This library is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
Library General Public License for more details. | Library General Public License for more details. | |||
skipping to change at line 79 | skipping to change at line 79 | |||
char *http_path_submit; /**< URL for submitting to the server throu gh HTTP, | char *http_path_submit; /**< URL for submitting to the server throu gh HTTP, | |||
defaults to /~cddb/submit.cgi' | defaults to /~cddb/submit.cgi' | |||
(see DEFAULT_PATH_SUBMIT) */ | (see DEFAULT_PATH_SUBMIT) */ | |||
int is_http_enabled; /**< use HTTP, disabled by default */ | int is_http_enabled; /**< use HTTP, disabled by default */ | |||
int is_http_proxy_enabled; /**< use HTTP through a proxy server, | int is_http_proxy_enabled; /**< use HTTP through a proxy server, | |||
disabled by default */ | disabled by default */ | |||
char *http_proxy_server; /**< host name of the HTTP proxy server */ | char *http_proxy_server; /**< host name of the HTTP proxy server */ | |||
int http_proxy_server_port; /**< port of the HTTP proxy server, | int http_proxy_server_port; /**< port of the HTTP proxy server, | |||
defaults to 8080 (see DEFAULT_PROXY_PO RT) */ | defaults to 8080 (see DEFAULT_PROXY_PO RT) */ | |||
char *http_proxy_username; /**< HTTP proxy user name */ | ||||
char *http_proxy_password; /**< HTTP proxy password */ | ||||
char *http_proxy_auth; /**< Base64 encoded username:password */ | ||||
FILE *cache_fp; /**< a file pointer to a cached CDDB entry or | FILE *cache_fp; /**< a file pointer to a cached CDDB entry or | |||
NULL if no cached version is available */ | NULL if no cached version is available */ | |||
int use_cache; /**< field to specify local CDDB cache beha viour, | int use_cache; /**< field to specify local CDDB cache beha viour, | |||
enabled by default (CACHE_ON) */ | enabled by default (CACHE_ON) */ | |||
char *cache_dir; /**< CDDB slave cache, defaults to | char *cache_dir; /**< CDDB slave cache, defaults to | |||
'~/.cddbslave' (see DEFAULT_CACHE) */ | '~/.cddbslave' (see DEFAULT_CACHE) */ | |||
int cache_read; /**< read data from cached file instead of | int cache_read; /**< read data from cached file instead of | |||
from the network */ | from the network */ | |||
skipping to change at line 136 | skipping to change at line 139 | |||
/* --- getters & setters --- */ | /* --- getters & setters --- */ | |||
/** | /** | |||
* Set the character set. By default the FreeDB server uses UTF-8 when | * Set the character set. By default the FreeDB server uses UTF-8 when | |||
* providing CD data. When a character set is defined with this function | * providing CD data. When a character set is defined with this function | |||
* any strings retrieved from or sent to the server will automatically be | * any strings retrieved from or sent to the server will automatically be | |||
* converted. | * converted. | |||
* | * | |||
* @param c The connection structure. | * @param c The connection structure. | |||
* @param charset The character set that will be used. | * @param cs The character set that will be used. | |||
* @return FALSE if the specified character set is unknown, or no conversio n | * @return FALSE if the specified character set is unknown, or no conversio n | |||
* from/to UTF-8 is available. TRUE otherwise. | * from/to UTF-8 is available. TRUE otherwise. | |||
*/ | */ | |||
int cddb_set_charset(cddb_conn_t *c, const char *cs); | int cddb_set_charset(cddb_conn_t *c, const char *cs); | |||
/** | /** | |||
* Change the size of the internal buffer. | * Change the size of the internal buffer. | |||
* | * | |||
* @param c The connection structure. | * @param c The connection structure. | |||
* @param size The new buffer size. | * @param size The new buffer size. | |||
skipping to change at line 368 | skipping to change at line 371 | |||
* Set the port of the HTTP proxy server. The default value is 8080. | * Set the port of the HTTP proxy server. The default value is 8080. | |||
* | * | |||
* @see cddb_get_http_proxy_server_port | * @see cddb_get_http_proxy_server_port | |||
* | * | |||
* @param c The connection structure. | * @param c The connection structure. | |||
* @param port The server port. | * @param port The server port. | |||
*/ | */ | |||
void cddb_set_http_proxy_server_port(cddb_conn_t *c, int port); | void cddb_set_http_proxy_server_port(cddb_conn_t *c, int port); | |||
/** | /** | |||
* Set the HTTP proxy user name which is used when Basic Authentication | ||||
* is required. | ||||
* | ||||
* @param c The connection structure. | ||||
* @param username The user name. | ||||
*/ | ||||
void cddb_set_http_proxy_username(cddb_conn_t* c, const char* username); | ||||
/** | ||||
* Get the HTTP proxy user name. | ||||
* | ||||
* @param c The connection structure. | ||||
* @return The user name. | ||||
*/ | ||||
#define cddb_get_http_proxy_username(c) (c)->http_proxy_username | ||||
/** | ||||
* Set the HTTP proxy password which is used when Basic Authentication | ||||
* is required. | ||||
* | ||||
* @param c The connection structure. | ||||
* @param passwd The password. | ||||
*/ | ||||
void cddb_set_http_proxy_password(cddb_conn_t* c, const char* passwd); | ||||
/** | ||||
* Get the HTTP proxy password. | ||||
* | ||||
* @param c The connection structure. | ||||
* @return The password. | ||||
*/ | ||||
#define cddb_get_http_proxy_password(c) (c)->http_proxy_password | ||||
/** | ||||
* Set the HTTP proxy user name and password in one go. These | ||||
* credentials are used when Basic Authentication is required. The | ||||
* advantage of using this function over setting the user name and | ||||
* password seperately is that the cleartext user name and password | ||||
* are not kept in memory longer than needed. | ||||
* | ||||
* @param c The connection structure. | ||||
* @param username The user name. | ||||
* @param passwd The password. | ||||
*/ | ||||
void cddb_set_http_proxy_credentials(cddb_conn_t* c, | ||||
const char *username, const char* pass | ||||
wd); | ||||
/** | ||||
* Get the error number returned by the last libcddb command. | * Get the error number returned by the last libcddb command. | |||
* | * | |||
* @param c The CDDB connection structure. | * @param c The CDDB connection structure. | |||
* @return The error number. | * @return The error number. | |||
*/ | */ | |||
#define cddb_errno(c) (c)->errnum | #define cddb_errno(c) (c)->errnum | |||
/** | /** | |||
* Set the name and version of the client program overwriting the | * Set the name and version of the client program overwriting the | |||
* previous values. This function will make a copy of the provided | * previous values. This function will make a copy of the provided | |||
End of changes. 5 change blocks. | ||||
3 lines changed or deleted | 59 lines changed or added | |||
cddb_disc.h | cddb_disc.h | |||
---|---|---|---|---|
/* | /* | |||
$Id: cddb_disc.h,v 1.19 2004/07/18 07:23:09 airborne Exp $ | $Id: cddb_disc.h,v 1.20 2005/03/11 21:29:29 airborne Exp $ | |||
Copyright (C) 2003, 2004 Kris Verbeeck <airborne@advalvas.be> | Copyright (C) 2003, 2004, 2005 Kris Verbeeck <airborne@advalvas.be> | |||
This library is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU Library General Public | modify it under the terms of the GNU Library General Public | |||
License as published by the Free Software Foundation; either | License as published by the Free Software Foundation; either | |||
version 2 of the License, or (at your option) any later version. | version 2 of the License, or (at your option) any later version. | |||
This library is distributed in the hope that it will be useful, | This library is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
Library General Public License for more details. | Library General Public License for more details. | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
cddb_error.h | cddb_error.h | |||
---|---|---|---|---|
/* | /* | |||
$Id: cddb_error.h,v 1.9 2004/10/16 07:58:28 airborne Exp $ | $Id: cddb_error.h,v 1.11 2005/05/07 09:20:03 airborne Exp $ | |||
Copyright (C) 2003, 2004 Kris Verbeeck <airborne@advalvas.be> | Copyright (C) 2003, 2004, 2005 Kris Verbeeck <airborne@advalvas.be> | |||
This library is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU Library General Public | modify it under the terms of the GNU Library General Public | |||
License as published by the Free Software Foundation; either | License as published by the Free Software Foundation; either | |||
version 2 of the License, or (at your option) any later version. | version 2 of the License, or (at your option) any later version. | |||
This library is distributed in the hope that it will be useful, | This library is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
Library General Public License for more details. | Library General Public License for more details. | |||
skipping to change at line 73 | skipping to change at line 73 | |||
a certain command */ | a certain command */ | |||
CDDB_ERR_TRACK_NOT_FOUND, /**< specified track is not present */ | CDDB_ERR_TRACK_NOT_FOUND, /**< specified track is not present */ | |||
CDDB_ERR_REJECTED, /**< posted data rejected */ | CDDB_ERR_REJECTED, /**< posted data rejected */ | |||
CDDB_ERR_EMAIL_INVALID, /**< the e-mail address used when | CDDB_ERR_EMAIL_INVALID, /**< the e-mail address used when | |||
submitting is invalid */ | submitting is invalid */ | |||
CDDB_ERR_INVALID_CHARSET, /**< invalid character set or unsupported | CDDB_ERR_INVALID_CHARSET, /**< invalid character set or unsupported | |||
conversion */ | conversion */ | |||
CDDB_ERR_ICONV_FAIL, /**< character set conversion failed */ | CDDB_ERR_ICONV_FAIL, /**< character set conversion failed */ | |||
/* --- new errors added to back of list for backward compatibility --- | ||||
*/ | ||||
CDDB_ERR_PROXY_AUTH, /**< proxy authentication failed */ | ||||
/* --- terminator --- */ | /* --- terminator --- */ | |||
CDDB_ERR_LAST | CDDB_ERR_LAST | |||
} cddb_error_t; | } cddb_error_t; | |||
/* --- error handling --- */ | /* --- error handling --- */ | |||
/** | /** | |||
* Returns a string representation of the CDDB error code. | * Returns a string representation of the CDDB error code. | |||
* | * | |||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 7 lines changed or added | |||
cddb_log.h | cddb_log.h | |||
---|---|---|---|---|
/* | /* | |||
$Id: cddb_log.h,v 1.3 2004/07/18 07:23:09 airborne Exp $ | $Id: cddb_log.h,v 1.4 2005/03/11 21:29:29 airborne Exp $ | |||
Copyright (C) 2003, 2004 Kris Verbeeck <airborne@advalvas.be> | Copyright (C) 2003, 2004, 2005 Kris Verbeeck <airborne@advalvas.be> | |||
This library is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU Library General Public | modify it under the terms of the GNU Library General Public | |||
License as published by the Free Software Foundation; either | License as published by the Free Software Foundation; either | |||
version 2 of the License, or (at your option) any later version. | version 2 of the License, or (at your option) any later version. | |||
This library is distributed in the hope that it will be useful, | This library is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
Library General Public License for more details. | Library General Public License for more details. | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
cddb_track.h | cddb_track.h | |||
---|---|---|---|---|
/* | /* | |||
$Id: cddb_track.h,v 1.17 2004/07/18 07:23:09 airborne Exp $ | $Id: cddb_track.h,v 1.18 2005/03/11 21:29:29 airborne Exp $ | |||
Copyright (C) 2003, 2004 Kris Verbeeck <airborne@advalvas.be> | Copyright (C) 2003, 2004, 2005 Kris Verbeeck <airborne@advalvas.be> | |||
This library is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU Library General Public | modify it under the terms of the GNU Library General Public | |||
License as published by the Free Software Foundation; either | License as published by the Free Software Foundation; either | |||
version 2 of the License, or (at your option) any later version. | version 2 of the License, or (at your option) any later version. | |||
This library is distributed in the hope that it will be useful, | This library is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
Library General Public License for more details. | Library General Public License for more details. | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||