summaryrefslogtreecommitdiffstats
path: root/src/null.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-06-06 12:17:58 +0000
committerLennart Poettering <lennart@poettering.net>2008-06-06 12:17:58 +0000
commit617c912e950d582c5690e558b28fa1070f9b8263 (patch)
treee0c2ef90b6fcd291f3466a2c703d07b208981d06 /src/null.c
parent0cc6ddf46d77f0f8c657588b8373e1e87512d578 (diff)
unify double inclusion defines src/sound-theme-spec.h src/read-wav.h src/read-vorbis.h src/proplist.h src/mutex.h src/llist.h src/common.h
git-svn-id: file:///home/lennart/svn/public/libcanberra/trunk@52 01b60673-d06a-42c0-afdd-89cb8e0f78ac
Diffstat (limited to 'src/null.c')
-rw-r--r--src/null.c82
1 files changed, 82 insertions, 0 deletions
diff --git a/src/null.c b/src/null.c
new file mode 100644
index 0000000..5b66c1f
--- /dev/null
+++ b/src/null.c
@@ -0,0 +1,82 @@
+/* $Id$ */
+
+/***
+ This file is part of libcanberra.
+
+ Copyright 2008 Lennart Poettering
+
+ libcanberra is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation, either version 2.1 of the
+ License, or (at your option) any later version.
+
+ libcanberra is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with libcanberra. If not, If not, see
+ <http://www.gnu.org/licenses/>.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include "canberra.h"
+#include "common.h"
+#include "driver.h"
+
+int driver_open(ca_context *c) {
+ ca_return_val_if_fail(c, CA_ERROR_INVALID);
+ ca_return_val_if_fail(!c->driver || streq(c->driver, "null"), CA_ERROR_NODRIVER);
+
+ return CA_SUCCESS;
+}
+
+int driver_destroy(ca_context *c) {
+ ca_return_val_if_fail(c, CA_ERROR_INVALID);
+
+ return CA_SUCCESS;
+}
+
+int driver_change_device(ca_context *c, char *device) {
+ ca_return_val_if_fail(c, CA_ERROR_INVALID);
+
+ return CA_SUCCESS;
+}
+
+int driver_change_props(ca_context *c, ca_proplist *changed, ca_proplist *merged) {
+ ca_return_val_if_fail(c, CA_ERROR_INVALID);
+ ca_return_val_if_fail(changed, CA_ERROR_INVALID);
+ ca_return_val_if_fail(merged, CA_ERROR_INVALID);
+
+ return CA_SUCCESS;
+}
+
+int driver_play(ca_context *c, uint32_t id, ca_proplist *proplist, ca_finish_callback_t cb, void *userdata) {
+ ca_return_val_if_fail(c, CA_ERROR_INVALID);
+ ca_return_val_if_fail(proplist, CA_ERROR_INVALID);
+ ca_return_val_if_fail(!userdata || cb, CA_ERROR_INVALID);
+
+ if (cb)
+ cb(c, id, CA_SUCCESS, userdata);
+
+ return CA_SUCCESS;
+}
+
+int driver_cancel(ca_context *c, uint32_t id) {
+ ca_return_val_if_fail(c, CA_ERROR_INVALID);
+
+ return CA_SUCCESS;
+}
+
+int driver_cache(ca_context *c, ca_proplist *proplist) {
+ ca_return_val_if_fail(c, CA_ERROR_INVALID);
+ ca_return_val_if_fail(proplist, CA_ERROR_INVALID);
+
+ return CA_ERROR_NOTSUPPORTED;
+}