All functions that are needed in order to do a Freedb search. More...
#include <string.h>
#include <unistd.h>
#include <netdb.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include "splt.h"
#include "socket_manager.h"
#include "freedb.h"
Go to the source code of this file.
Defines | |
#define | DONT_SKIP_LINES 0 |
#define | SKIP_ONE_LINE 1 |
Functions | |
char * | get_cgi_path_and_cut_server (int type, const char *search_server) |
char * | splt_freedb_get_file (splt_state *state, int disc_id, int *error, int get_type, const char cddb_get_server[256], int port_number) |
int | splt_freedb_process_search (splt_state *state, char *search, int search_type, const char search_server[256], int port_number) |
Variables | |
char * | test = NULL |
All functions that are needed in order to do a Freedb search.
Don't use these functions directly. The version of these functions that is meant to be used directly are all in mp3splt.c.
Definition in file freedb.c.
char* splt_freedb_get_file | ( | splt_state * | state, | |
int | disc_id, | |||
int * | error, | |||
int | get_type, | |||
const char | cddb_get_server[256], | |||
int | port_number | |||
) |
must only be called after process_freedb_search
returns the cddb file content corresponding to the last search, for the disc_id (parameter of the function)
state | The central structure that keeps all data this library uses | |
error | Is set to the error code this action results in | |
disc_id | The freedb disc ID. | |
cddb_get_type | specifies the type of the get: it can be SPLT_FREEDB_GET_FILE_TYPE_CDDB_CGI (that works for both freedb and freedb2 at the moment - 18_10_06) or SPLT_FREEDB_GET_FILE_TYPE_CDDB (that only work for freedb at the moment - 18_10_06) |
Definition at line 456 of file freedb.c.
References SPLT_FALSE, and SPLT_TRUE.
Referenced by mp3splt_write_freedb_file_result().
int splt_freedb_process_search | ( | splt_state * | state, | |
char * | search, | |||
int | search_type, | |||
const char | search_server[256], | |||
int | port_number | |||
) |
search the freedb according to "search"
state | The central structure this library keeps all its data in | |
search_string | The string that is to be searched for | |
error | The error code this action returns in | |
search_type | the type of the search. Can be set to SPLT_FREEDB_SEARCH_TYPE_CDDB_CGI | |
search_server | The URL of the search server or NULL to select the default which currently means freedb2.org | |
port | The port on the server. -1 means default (Which should be 80). |
Definition at line 293 of file freedb.c.
References SPLT_FREEDB_SEARCH_TYPE_CDDB_CGI, and SPLT_MAXCD.
Referenced by mp3splt_get_freedb_search().