00001 /********************************************************** 00002 * 00003 * libmp3splt -- library based on mp3splt, 00004 * for mp3/ogg splitting without decoding 00005 * 00006 * Copyright (c) 2002-2005 M. Trotta - <mtrotta@users.sourceforge.net> 00007 * Copyright (c) 2005-2012 Alexandru Munteanu - io_fx@yahoo.fr 00008 * 00009 * http://mp3splt.sourceforge.net 00010 * 00011 *********************************************************/ 00012 00013 /********************************************************** 00014 * 00015 * This program is free software; you can redistribute it and/or 00016 * modify it under the terms of the GNU General Public License 00017 * as published by the Free Software Foundation; either version 2 00018 * of the License, or (at your option) any later version. 00019 * 00020 * This program is distributed in the hope that it will be useful, 00021 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 * GNU General Public License for more details. 00024 * 00025 * You should have received a copy of the GNU General Public License 00026 * along with this program; if not, write to the Free Software 00027 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00028 * 02111-1307, 00029 * USA. 00030 * 00031 *********************************************************/ 00032 00033 #ifndef FREEDB_H 00034 00035 //structure for the socket connection 00036 typedef struct { 00037 short proxy; 00038 char hostname[512]; 00039 int port; 00040 char *auth; 00041 } splt_addr; 00042 00043 typedef struct { 00044 int err; 00045 char *file; 00046 int stop_on_dot; 00047 } splt_get_file; 00048 00049 int splt_freedb_process_search(splt_state *state, char *search, 00050 int search_type, const char *cddb_get_server, 00051 int port); 00052 char *splt_freedb_get_file(splt_state *state, int i, int *error, 00053 int get_type, const char *cddb_get_server, int port); 00054 00055 //global freedb, ports and buffersize 00056 #define SPLT_FREEDB_BUFFERSIZE 8192 00057 00058 #define SPLT_FREEDB2_SITE "tracktype.org" 00059 #define SPLT_FREEDB_SITE "freedb.org" 00060 00061 //cddb protocol 00062 #define SPLT_FREEDB_HELLO "CDDB HELLO nouser mp3splt.sf.net "SPLT_PACKAGE_NAME" "SPLT_PACKAGE_VERSION"\n" 00063 #define SPLT_FREEDB_GET_FILE "CDDB READ %s %s\n" 00064 00065 //cddb.cgi 00066 #define SPLT_FREEDB2_SEARCH "GET %s?cmd=cddb+album+%s"SPLT_FREEDB_HELLO_PROTO 00067 #define SPLT_FREEDB_HELLO_PROTO "&hello=nouser+mp3splt.sf.net+"SPLT_PACKAGE_NAME"+"SPLT_PACKAGE_VERSION"&proto=5" 00068 #define SPLT_FREEDB_CDDB_CGI_GET_FILE "GET %s?cmd=cddb+read+%s+%s"SPLT_FREEDB_HELLO_PROTO 00069 00070 //proxy stuff 00071 //#define PROXYCONFIG ".mp3splt" 00072 //#define PROXYDLG "HTTP/1.0\nUserAgent: "PACKAGE_NAME"/"PACKAGE_VERSION"\n" 00073 //#define SPLT_AUTH "Proxy-Authorization: Basic " 00074 00075 #define FREEDB_H 00076 00077 #endif 00078