1 /********************************************************** 2 * 3 * libmp3splt -- library based on mp3splt, 4 * for mp3/ogg splitting without decoding 5 * 6 * Copyright (c) 2002-2005 M. Trotta - <mtrotta@users.sourceforge.net> 7 * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net 8 * 9 * http://mp3splt.sourceforge.net 10 * 11 *********************************************************/ 12 13 /********************************************************** 14 * 15 * This program is free software; you can redistribute it and/or 16 * modify it under the terms of the GNU General Public License 17 * as published by the Free Software Foundation; either version 2 18 * of the License, or (at your option) any later version. 19 * 20 * This program is distributed in the hope that it will be useful, 21 * but WITHOUT ANY WARRANTY; without even the implied warranty of 22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 * GNU General Public License for more details. 24 * 25 * You should have received a copy of the GNU General Public License 26 * along with this program; if not, write to the Free Software 27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 28 * USA. 29 * 30 *********************************************************/ 31 32 #ifndef FREEDB_H 33 34 typedef struct { 35 int err; 36 char *file; 37 int stop_on_dot; 38 } splt_get_file; 39 40 int splt_freedb_process_search(splt_state *state, char *search, 41 int search_type, const char *cddb_get_server, 42 int port); 43 char *splt_freedb_get_file(splt_state *state, int i, int *error, 44 int get_type, const char *cddb_get_server, int port); 45 46 //global freedb, ports and buffersize 47 #define SPLT_FREEDB_BUFFERSIZE 8192 48 49 #define SPLT_FREEDB2_SITE "tracktype.org" 50 #define SPLT_FREEDB_SITE "freedb.org" 51 52 //cddb protocol 53 #define SPLT_FREEDB_HELLO "CDDB HELLO nouser mp3splt.sf.net "SPLT_PACKAGE_NAME" "SPLT_PACKAGE_VERSION"\n" 54 #define SPLT_FREEDB_GET_FILE "CDDB READ %s %s\n" 55 56 //cddb.cgi 57 #define SPLT_FREEDB2_SEARCH "GET %s?cmd=cddb+album+%s"SPLT_FREEDB_HELLO_PROTO 58 #define SPLT_FREEDB_HELLO_PROTO "&hello=nouser+mp3splt.sf.net+"SPLT_PACKAGE_NAME"+"SPLT_PACKAGE_VERSION"&proto=5" 59 #define SPLT_FREEDB_CDDB_CGI_GET_FILE "GET %s?cmd=cddb+read+%s+%s"SPLT_FREEDB_HELLO_PROTO 60 61 #define FREEDB_H 62 63 #endif 64 65