modules: introduce PA_MODULE_DEPRECATED() macro for marking modules deprecated

This commit is contained in:
Lennart Poettering 2009-05-28 02:47:36 +02:00
parent 1c4393acf0
commit c224aace42
11 changed files with 31 additions and 2 deletions

View file

@ -17,6 +17,7 @@ gen_symbol(pa__get_author)
gen_symbol(pa__get_description)
gen_symbol(pa__get_usage)
gen_symbol(pa__get_version)
gen_symbol(pa__get_deprecated)
gen_symbol(pa__load_once)
gen_symbol(pa__get_n_used)
@ -28,6 +29,7 @@ const char* pa__get_author(void);
const char* pa__get_description(void);
const char* pa__get_usage(void);
const char* pa__get_version(void);
const char* pa__get_deprecated(void);
pa_bool_t pa__load_once(void);
#endif

View file

@ -50,6 +50,7 @@ PA_MODULE_DESCRIPTION("Detect available audio hardware and load matching drivers
PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_LOAD_ONCE(TRUE);
PA_MODULE_USAGE("just-one=<boolean>");
PA_MODULE_DEPRECATED("Please use module-hal-detect instead of module-detect!");
static const char* const valid_modargs[] = {
"just-one",

View file

@ -36,6 +36,7 @@ PA_MODULE_AUTHOR("Lennart Poettering");
PA_MODULE_DESCRIPTION("Compatibility module");
PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_LOAD_ONCE(TRUE);
PA_MODULE_DEPRECATED("Please use module-stream-restore instead of module-volume-restore!");
static const char* const valid_modargs[] = {
"table",
@ -62,7 +63,7 @@ int pa__init(pa_module*m) {
goto fail;
}
pa_log_warn("module-volume-restore is obsolete. It has been replaced by module-stream-restore. We will now load the latter but please make sure to remove module-volume-restore from your configuration.");
pa_log_warn("We will now load module-stream-restore. Please make sure to remove module-volume-restore from your configuration.");
t = pa_sprintf_malloc("restore_volume=%s restore_device=%s", pa_yes_no(restore_volume), pa_yes_no(restore_device));
pa_module_load(m->core, "module-stream-restore", t);

View file

@ -98,6 +98,9 @@ PA_MODULE_USAGE(
"fragments=<number of fragments> "
"fragment_size=<fragment size> "
"mmap=<enable memory mapping?>");
#ifdef __linux__
PA_MODULE_DEPRECATED("Please use module-alsa-card instead of module-oss!");
#endif
#define DEFAULT_DEVICE "/dev/dsp"