00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#ifndef CDDB_SITE_H
00023 #define CDDB_SITE_H 1
00024
00025
#ifdef __cplusplus
00026
extern "C" {
00027
#endif
00028
00029
00030
#include "cddb/cddb_error.h"
00031
00032
00033
00034
00035
00040 typedef enum {
00041
PROTO_UNKNOWN = 0,
00042
PROTO_CDDBP,
00043
PROTO_HTTP
00044 }
cddb_protocol_t;
00045
00050 typedef struct cddb_site_s
cddb_site_t;
00051
00052
00053
00054
00055
00061
cddb_site_t *
cddb_site_new(
void);
00062
00068
cddb_error_t cddb_site_destroy(cddb_site_t *site);
00069
00075
cddb_site_t *
cddb_site_clone(cddb_site_t *site);
00076
00077
00078
00079
00080
00089
cddb_error_t cddb_site_get_address(
const cddb_site_t *site,
00090
const char **address,
unsigned int *port);
00091
00101
cddb_error_t cddb_site_set_address(cddb_site_t *site,
00102
const char *address,
unsigned int port);
00103
00112
cddb_protocol_t cddb_site_get_protocol(
const cddb_site_t *site);
00113
00123
cddb_error_t cddb_site_set_protocol(cddb_site_t *site, cddb_protocol_t proto);
00124
00132
cddb_error_t cddb_site_get_query_path(
const cddb_site_t *site,
00133
const char **path);
00134
00144
cddb_error_t cddb_site_set_query_path(cddb_site_t *site,
const char *path);
00145
00153
cddb_error_t cddb_site_get_submit_path(
const cddb_site_t *site,
00154
const char **path);
00155
00165
cddb_error_t cddb_site_set_submit_path(cddb_site_t *site,
const char *path);
00166
00181
cddb_error_t cddb_site_get_location(
const cddb_site_t *site,
00182
float *latitude,
float *longitude);
00183
00196
cddb_error_t cddb_site_set_location(cddb_site_t *site,
00197
float latitude,
float longitude);
00198
00206
cddb_error_t cddb_site_get_description(
const cddb_site_t *site,
00207
const char **desc);
00208
00218
cddb_error_t cddb_site_set_description(cddb_site_t *site,
const char *desc);
00219
00220
00221
00222
00223
00232
int cddb_site_parse(cddb_site_t *site,
const char *line);
00233
00241
cddb_error_t cddb_site_print(
const cddb_site_t *site);
00242
00243
00244
#ifdef __cplusplus
00245
}
00246
#endif
00247
00248
#endif