Main Page | File List | File Members

cddb_site.h

Go to the documentation of this file.
00001 /* 00002 $Id: cddb_site.h,v 1.3 2005/06/15 16:08:28 airborne Exp $ 00003 00004 Copyright (C) 2005 Kris Verbeeck <airborne@advalvas.be> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public 00017 License along with this library; if not, write to the 00018 Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019 Boston, MA 02111-1307, USA. 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 /* --- type and structure definitions */ 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 /* --- construction / destruction */ 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 /* --- setters / getters --- */ 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 /* --- miscellaneous */ 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 /* CDDB_SITE_H */

Generated on Sat Jul 23 13:18:44 2005 for libcddb by doxygen 1.3.8