From 3639e65c41630247c4910e1679fd9d40b7f9311d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 23 Jun 2008 18:14:54 +0200 Subject: add new property CA_PROP_CANBERRA_ENABLE for disabling/enabling event sounds --- src/canberra.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/canberra.h') diff --git a/src/canberra.h b/src/canberra.h index fc9ef0a..3a3b88f 100644 --- a/src/canberra.h +++ b/src/canberra.h @@ -352,6 +352,19 @@ extern "C" { */ #define CA_PROP_CANBERRA_XDG_THEME_OUTPUT_PROFILE "canberra.xdg-theme.output-profile" +/** + * CA_PROP_CANBERRA_ENABLE: + * + * A special property that can be used to control whether any sounds + * are played at all. If this property is "1" or unset sounds are + * played as normal. However, if it is "0" all calls to + * ca_context_play() will fail with CA_ERROR_DISABLED. + * + * If the list of properties is handed on to the sound server this + * property is stripped from it. + */ +#define CA_PROP_CANBERRA_ENABLE "canberra.enable" + /** * ca_context: * @@ -399,7 +412,8 @@ enum { CA_ERROR_ACCESS = -13, CA_ERROR_IO = -14, CA_ERROR_INTERNAL = -15, - _CA_ERROR_MAX = -16 + CA_ERROR_DISABLED = -16, + _CA_ERROR_MAX = -17 }; /** -- cgit