#include <stdio.h>
#include <netinet/in.h>
Go to the source code of this file.
Classes | |
struct | cddb_conn_s |
An opaque structure for keeping state about the connection to a CDDB server. More... | |
Defines | |
#define | CDDB_CONN_H 1 |
#define | CACHE_OFF |
do not use local CDDB cache, network only | |
#define | CACHE_ON 1 /**< use local CDDB cache, if possible */ |
use local CDDB cache, if possible | |
#define | CACHE_ONLY |
only use local CDDB cache, no network access | |
#define | cddb_get_server_name(c) (c)->server_name |
Get the host name of the CDDB server that is currently being used. | |
#define | cddb_get_server_port(c) (c)->server_port |
Get the port of the CDDB server that is currently being used. | |
#define | cddb_get_timeout(c) (c)->timeout |
Get the network time out value (in seconds). | |
#define | cddb_set_timeout(c, t) (c)->timeout = t |
Set the network time out value (in seconds). | |
#define | cddb_get_http_path_query(c) (c)->http_path_query |
Get the URL path for querying a CDDB server through HTTP. | |
#define | cddb_get_http_path_submit(c) (c)->http_path_submit |
Get the URL path for submitting to a CDDB server through HTTP. | |
#define | cddb_is_http_enabled(c) (c)->is_http_enabled |
Returns true if the HTTP protocol is currently enabled and false if CDDBP is enabled. | |
#define | cddb_is_http_proxy_enabled(c) (c)->is_http_proxy_enabled |
Returns true if the proxy support is currently enabled and false if it is not. | |
#define | cddb_get_http_proxy_server_name(c) (c)->http_proxy_server |
Get the host name of the HTTP proxy server. | |
#define | cddb_get_http_proxy_server_port(c) (c)->http_proxy_server_port |
Get the port of the HTTP proxy server. | |
#define | cddb_errno(c) (c)->errnum |
Get the error number returned by the last libcddb command. | |
#define | cddb_cache_mode(c) (c)->use_cache |
Returns the current cache mode. | |
#define | cddb_cache_enable(c) (c)->use_cache = CACHE_ON |
Enable caching of CDDB entries locally. | |
#define | cddb_cache_only(c) (c)->use_cache = CACHE_ONLY |
Only use the local CDDB cache. | |
#define | cddb_cache_disable(c) (c)->use_cache = CACHE_OFF |
Disable caching of CDDB entries locally. | |
#define | cddb_cache_get_dir(c) (c)->cache_dir; |
Return the directory currently being used for caching. | |
Typedefs | |
typedef cddb_conn_s | cddb_conn_t |
An opaque structure for keeping state about the connection to a CDDB server. | |
Functions | |
cddb_conn_t * | cddb_new (void) |
Creates a new CDDB connection structure. | |
void | cddb_destroy (cddb_conn_t *c) |
Free all resources associated with the given CDDB connection structure. | |
void | cddb_set_buf_size (cddb_conn_t *c, unsigned int size) |
Change the size of the internal buffer. | |
void | cddb_set_server_name (cddb_conn_t *c, const char *server) |
Set the host name of the CDDB server. | |
void | cddb_set_server_port (cddb_conn_t *c, int port) |
Set the port of the CDDB server. | |
void | cddb_set_http_path_query (cddb_conn_t *c, const char *path) |
Set the URL path for querying a CDDB server through HTTP. | |
void | cddb_set_http_path_submit (cddb_conn_t *c, const char *path) |
Set the URL path for submitting to a CDDB server through HTTP. | |
void | cddb_http_enable (cddb_conn_t *c) |
Enable HTTP tunneling to connect to the CDDB server. | |
void | cddb_http_disable (cddb_conn_t *c) |
Disable HTTP tunneling to connect to the CDDB server. | |
void | cddb_http_proxy_enable (cddb_conn_t *c) |
Enable HTTP tunneling through an HTTP proxy server to connect to the CDDB server. | |
void | cddb_http_proxy_disable (cddb_conn_t *c) |
Disable HTTP tunneling through an HTTP proxy server to connect to the CDDB server. | |
void | cddb_set_http_proxy_server_name (cddb_conn_t *c, const char *server) |
Set the host name of the HTTP proxy server. | |
void | cddb_set_http_proxy_server_port (cddb_conn_t *c, int port) |
Set the port of the HTTP proxy server. | |
void | cddb_set_client (cddb_conn_t *c, const char *cname, const char *cversion) |
Set the name and version of the client program overwriting the previous values. | |
int | cddb_set_email_address (cddb_conn_t *c, const char *email) |
Sets the user name and host name of the local machine. | |
int | cddb_cache_set_dir (cddb_conn_t *c, const char *dir) |
Change the directory used for caching CDDB entries locally. |
|
Value: do not use local CDDB cache, network only
|
|
use local CDDB cache, if possible
|
|
Value: only use local CDDB cache, no network access
|
|
Disable caching of CDDB entries locally. All data will be fetched from a CDDB server everytime and the retrieved data will not be cached locally.
|
|
Enable caching of CDDB entries locally. Caching is enabled by default. The cache directory can be changed with the cddb_cache_set_dir function.
|
|
Return the directory currently being used for caching.
|
|
Returns the current cache mode. This can be either on, off or cache only.
|
|
Only use the local CDDB cache. Never contact a server to retrieve any data. The cache directory can be changed with the cddb_cache_set_dir function.
|
|
|
|
Get the error number returned by the last libcddb command.
|
|
Get the URL path for querying a CDDB server through HTTP.
|
|
Get the URL path for submitting to a CDDB server through HTTP.
|
|
Get the host name of the HTTP proxy server.
|
|
Get the port of the HTTP proxy server.
|
|
Get the host name of the CDDB server that is currently being used.
|
|
Get the port of the CDDB server that is currently being used.
|
|
Get the network time out value (in seconds).
|
|
Returns true if the HTTP protocol is currently enabled and false if CDDBP is enabled.
|
|
Returns true if the proxy support is currently enabled and false if it is not. This fucntion does not check whether HTTP is enabled. So it is possible that true will be returned while in reality the CDDBP protocol is being used (no proxy support).
|
|
Set the network time out value (in seconds). The default is 10 seconds.
|
|
An opaque structure for keeping state about the connection to a CDDB server.
|
|
Change the directory used for caching CDDB entries locally. The default location of the cached entries is a subdirectory (.cddbslave) of the user's home directory. If the first character of the directory is '~', then it will be expanded to the contents of $HOME.
|
|
Free all resources associated with the given CDDB connection structure.
|
|
Disable HTTP tunneling to connect to the CDDB server. By default this option is disabled.
|
|
Enable HTTP tunneling to connect to the CDDB server. By default this option is disabled.
|
|
Disable HTTP tunneling through an HTTP proxy server to connect to the CDDB server. By default this option is disabled.
|
|
Enable HTTP tunneling through an HTTP proxy server to connect to the CDDB server. The usage of an HTTP proxy implies normal HTTP tunneling instead of connecting directly to the CDDB server. By default this option is disabled.
|
|
Creates a new CDDB connection structure. This structure will have to be passed to all libcddb functions. Default values will be used for the connection parameters allowing it to contact the CDDB server at freedb.org.
|
|
Change the size of the internal buffer.
|
|
Set the name and version of the client program overwriting the previous values. This function will make a copy of the provided strings. The defaults are 'libcddb' and the version number of the libcddb library in use. Both parameters must be valid strings. If any of teh strings is NULL, this fucntion will return without changing anything.
|
|
Sets the user name and host name of the local machine. This function will parse out the user name and host name from the e-mail address.
|
|
Set the URL path for querying a CDDB server through HTTP. The default value is '/~cddb/cddb.cgi'.
|
|
Set the URL path for submitting to a CDDB server through HTTP. The default value is '/~cddb/submit.cgi'.
|
|
Set the host name of the HTTP proxy server. There is no default value.
|
|
Set the port of the HTTP proxy server. The default value is 8080.
|
|
Set the host name of the CDDB server. The default value for the server is 'freedb.org'.
|
|
Set the port of the CDDB server. The default value is 888.
|