Path: blob/master/thirdparty/linuxbsd_headers/pulse/ext-device-restore.h
9905 views
#ifndef foopulseextdevicerestorehfoo1#define foopulseextdevicerestorehfoo23/***4This file is part of PulseAudio.56Copyright 2008 Lennart Poettering7Copyright 2011 Colin Guthrie89PulseAudio is free software; you can redistribute it and/or modify10it under the terms of the GNU Lesser General Public License as published11by the Free Software Foundation; either version 2.1 of the License,12or (at your option) any later version.1314PulseAudio is distributed in the hope that it will be useful, but15WITHOUT ANY WARRANTY; without even the implied warranty of16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU17General Public License for more details.1819You should have received a copy of the GNU Lesser General Public License20along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.21***/2223#include <pulse/context.h>24#include <pulse/format.h>25#include <pulse/version.h>2627/** \file28*29* Routines for controlling module-device-restore30*/3132PA_C_DECL_BEGIN3334/** Stores information about one device in the device database that is35* maintained by module-device-manager. \since 1.0 */36typedef struct pa_ext_device_restore_info {37pa_device_type_t type; /**< Device type sink or source? */38uint32_t index; /**< The device index */39uint8_t n_formats; /**< How many formats do we have? */40pa_format_info **formats; /**< An array of formats (may be NULL if n_formats == 0) */41} pa_ext_device_restore_info;4243/** Callback prototype for pa_ext_device_restore_test(). \since 1.0 */44typedef void (*pa_ext_device_restore_test_cb_t)(45pa_context *c,46uint32_t version,47void *userdata);4849/** Test if this extension module is available in the server. \since 1.0 */50pa_operation *pa_ext_device_restore_test(51pa_context *c,52pa_ext_device_restore_test_cb_t cb,53void *userdata);5455/** Subscribe to changes in the device database. \since 1.0 */56pa_operation *pa_ext_device_restore_subscribe(57pa_context *c,58int enable,59pa_context_success_cb_t cb,60void *userdata);6162/** Callback prototype for pa_ext_device_restore_set_subscribe_cb(). \since 1.0 */63typedef void (*pa_ext_device_restore_subscribe_cb_t)(64pa_context *c,65pa_device_type_t type,66uint32_t idx,67void *userdata);6869/** Set the subscription callback that is called when70* pa_ext_device_restore_subscribe() was called. \since 1.0 */71void pa_ext_device_restore_set_subscribe_cb(72pa_context *c,73pa_ext_device_restore_subscribe_cb_t cb,74void *userdata);7576/** Callback prototype for pa_ext_device_restore_read_formats(). \since 1.0 */77typedef void (*pa_ext_device_restore_read_device_formats_cb_t)(78pa_context *c,79const pa_ext_device_restore_info *info,80int eol,81void *userdata);8283/** Read the formats for all present devices from the device database. \since 1.0 */84pa_operation *pa_ext_device_restore_read_formats_all(85pa_context *c,86pa_ext_device_restore_read_device_formats_cb_t cb,87void *userdata);8889/** Read an entry from the device database. \since 1.0 */90pa_operation *pa_ext_device_restore_read_formats(91pa_context *c,92pa_device_type_t type,93uint32_t idx,94pa_ext_device_restore_read_device_formats_cb_t cb,95void *userdata);9697/** Read an entry from the device database. \since 1.0 */98pa_operation *pa_ext_device_restore_save_formats(99pa_context *c,100pa_device_type_t type,101uint32_t idx,102uint8_t n_formats,103pa_format_info **formats,104pa_context_success_cb_t cb,105void *userdata);106107PA_C_DECL_END108109#endif110111112