libmp3splt
|
#include <string.h>
#include <unistd.h>
#include <netdb.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include "splt.h"
#include "freedb.h"
Go to the source code of this file.
Defines | |
#define | closesocket close |
Functions | |
char * | splt_freedb_get_file (splt_state *state, int i, int *error, int get_type, const char cddb_get_server[256], int port) |
int | splt_freedb_process_search (splt_state *state, char *search, int search_type, const char search_server[256], int port) |
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 | i, | ||
int * | error, | ||
int | get_type, | ||
const char | cddb_get_server[256], | ||
int | port | ||
) |
must only be called after process_freedb_search
returns the cddb file content corresponding to the last search, for the disc_id i (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 593 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 | ||
) |
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 ert 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 308 of file freedb.c.
References SPLT_FALSE, SPLT_FREEDB_SEARCH_TYPE_CDDB_CGI, SPLT_MAXCD, and SPLT_TRUE.
Referenced by mp3splt_get_freedb_search().