summaryrefslogtreecommitdiffstats
path: root/src/canberra.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-06-23 18:14:54 +0200
committerLennart Poettering <lennart@poettering.net>2008-06-23 18:14:54 +0200
commit3639e65c41630247c4910e1679fd9d40b7f9311d (patch)
tree076be635fb0d9af7bc19f0874c861b6bf9aef714 /src/canberra.h
parentc47b8cd562cc66881efe257b5ebc3109e07097a9 (diff)
add new property CA_PROP_CANBERRA_ENABLE for disabling/enabling event sounds
Diffstat (limited to 'src/canberra.h')
-rw-r--r--src/canberra.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/canberra.h b/src/canberra.h
index fc9ef0a..3a3b88f 100644
--- a/src/canberra.h
+++ b/src/canberra.h
@@ -353,6 +353,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:
*
* A libcanberra context object.
@@ -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
};
/**