From 617c912e950d582c5690e558b28fa1070f9b8263 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 6 Jun 2008 12:17:58 +0000 Subject: 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 --- src/null.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 src/null.c (limited to 'src/null.c') 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 + . +***/ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + +#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; +} -- cgit