conf: const pointers in block get functions

All config_get_block_*() functions should accept constant config_param
pointers.
This commit is contained in:
Max Kellermann
2009-01-25 16:03:49 +01:00
parent 80799fa84e
commit 5f77910097
27 changed files with 49 additions and 49 deletions

View File

@@ -108,7 +108,7 @@ alsa_data_free(struct alsa_data *ad)
}
static void
alsa_configure(struct alsa_data *ad, struct config_param *param)
alsa_configure(struct alsa_data *ad, const struct config_param *param)
{
ad->device = config_dup_block_string(param, "device", NULL);
@@ -138,7 +138,7 @@ alsa_configure(struct alsa_data *ad, struct config_param *param)
static void *
alsa_init(G_GNUC_UNUSED struct audio_output *ao,
G_GNUC_UNUSED const struct audio_format *audio_format,
struct config_param *param)
const struct config_param *param)
{
/* no need for pthread_once thread-safety when reading config */
static int free_global_registered;

View File

@@ -77,7 +77,7 @@ static void audioOutputAo_error(const char *msg)
static void *
audioOutputAo_initDriver(struct audio_output *ao,
G_GNUC_UNUSED const struct audio_format *audio_format,
struct config_param *param)
const struct config_param *param)
{
ao_info *ai;
AoData *ad = newAoData();

View File

@@ -161,7 +161,7 @@ static bool openFifo(FifoData *fd)
static void *fifo_initDriver(G_GNUC_UNUSED struct audio_output *ao,
G_GNUC_UNUSED const struct audio_format *audio_format,
struct config_param *param)
const struct config_param *param)
{
FifoData *fd;
char *value, *path;

View File

@@ -183,7 +183,7 @@ mpd_jack_error(const char *msg)
static void *
mpd_jack_init(struct audio_output *ao,
G_GNUC_UNUSED const struct audio_format *audio_format,
struct config_param *param)
const struct config_param *param)
{
struct jack_data *jd;
const char *value;

View File

@@ -112,7 +112,7 @@ static bool mvp_testDefault(void)
static void *mvp_initDriver(G_GNUC_UNUSED struct audio_output *audio_output,
G_GNUC_UNUSED const struct audio_format *audio_format,
G_GNUC_UNUSED struct config_param *param)
G_GNUC_UNUSED const struct config_param *param)
{
MvpData *md = g_new(MvpData, 1);
md->audio_output = audio_output;

View File

@@ -32,7 +32,7 @@ struct null_data {
static void *
null_init(G_GNUC_UNUSED struct audio_output *audio_output,
G_GNUC_UNUSED const struct audio_format *audio_format,
G_GNUC_UNUSED struct config_param *param)
G_GNUC_UNUSED const struct config_param *param)
{
struct null_data *nd = g_new(struct null_data, 1);

View File

@@ -344,7 +344,7 @@ static bool oss_testDefault(void)
return false;
}
static void *oss_open_default(struct config_param *param)
static void *oss_open_default(const struct config_param *param)
{
int i;
int err[G_N_ELEMENTS(default_devices)];
@@ -390,7 +390,7 @@ static void *oss_open_default(struct config_param *param)
static void *
oss_initDriver(G_GNUC_UNUSED struct audio_output *audioOutput,
G_GNUC_UNUSED const struct audio_format *audio_format,
struct config_param *param)
const struct config_param *param)
{
if (param) {
const char *device =

View File

@@ -83,7 +83,7 @@ static bool osx_testDefault(void)
static void *
osx_initDriver(G_GNUC_UNUSED struct audio_output *audioOutput,
G_GNUC_UNUSED const struct audio_format *audio_format,
G_GNUC_UNUSED struct config_param *param)
G_GNUC_UNUSED const struct config_param *param)
{
return newOsxData();
}

View File

@@ -55,7 +55,7 @@ static void pulse_free_data(struct pulse_data *pd)
static void *
pulse_init(struct audio_output *ao,
G_GNUC_UNUSED const struct audio_format *audio_format,
struct config_param *param)
const struct config_param *param)
{
struct pulse_data *pd;

View File

@@ -94,7 +94,7 @@ static void free_shout_data(struct shout_data *sd)
static void *my_shout_init_driver(struct audio_output *audio_output,
const struct audio_format *audio_format,
struct config_param *param)
const struct config_param *param)
{
struct shout_data *sd;
char *test;